Re: query string on a prepared statement

Поиск
Список
Период
Сортировка
От Roger Niederland
Тема Re: query string on a prepared statement
Дата
Msg-id 002801c4d277$ee33a640$0c02010a@RogerPortable
обсуждение исходный текст
Ответ на query string on a prepared statement  ("Roger Niederland" <roger@niederland.com>)
Список pgsql-jdbc
Similar code work previously on DB2, Mysql and earlier versions of the
released postgresql jdbc drivers.  So I assumed that this was a driver
problem.
Thanks, for the quick response!

> Roger Niederland wrote:
>
>> Using pg80b1.308.jdbc3.jar got the following: (worked with
>> pg74.215.jdbc3.jar)
>>
>> Code:
>> results = stmt.executeQuery("SELECT currval('LoginLog_LoginLogID_seq')");
>>
>> Stack Trace:
>> org.postgresql.util.PSQLException: Can't use query methods that take a
>> query string on a PreparedStatement.
>
> As it says, you can't use executeQuery(String) on a PreparedStatement. Use
> it on a Statement created via Connection.createStatement() instead.
>
> The JDBC spec requires that PreparedStatement throw an exception in this
> case. Older drivers did not follow the spec.
>
> -O
>
>



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

Предыдущее
От: Thomas Hallgren
Дата:
Сообщение: Re: UNICODE and 8.0.0beta5
Следующее
От: Vadim Nasardinov
Дата:
Сообщение: failures in dbMetaClient1 (was: Re: CTS 1.3.1 results)