Re: JDBC parse error with preparedStatement!

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: JDBC parse error with preparedStatement!
Дата
Msg-id Pine.LNX.4.33.0401111610180.5953-100000@leary.csoft.net
обсуждение исходный текст
Ответ на JDBC parse error with preparedStatement!  (Ramin Rad <ramin@flamenco-teacher.com>)
Ответы Re: JDBC parse error with preparedStatement!  (Ramin Rad <ramin@flamenco-teacher.com>)
Re: JDBC parse error with preparedStatement!  (Ramin Rad <ramin@flamenco-teacher.com>)
Список pgsql-jdbc

On Sun, 11 Jan 2004, Ramin Rad wrote:

>
> I am getting a very annoying parse error message on a simple delete statement:
>
>   String sqlStmt = "DELETE FROM ft_member WHERE username = ?";
>   PreparedStatement stmt = connection.prepareStatement( sqlStmt );
>   stmt.setString( 1, "test");
>   stmt.executeUpdate( sqlStmt );
>
> Here is the error message:
>
> Exception in thread "main" java.sql.SQLException: ERROR:  parser: parse error
> at end of input
>

I can't see anything that's going wrong here either.  The best way to
debug this problem is to enable statement loggin on the server so we can
see the exact query the server tries to run.  To do this enable
log_statement in postgresql.conf and restart the server.

Kris Jurka


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: setFetchSize
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Connection Time