Re: PreparedStatement and TYPE bit

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: PreparedStatement and TYPE bit
Дата
Msg-id Pine.BSO.4.64.0612010904490.22186@leary2.csoft.net
обсуждение исходный текст
Ответ на Re: PreparedStatement and TYPE bit  (Ingmar Lötzsch <iloetzsch@asci-systemhaus.de>)
Список pgsql-jdbc

On Tue, 28 Nov 2006, Ingmar Lötzsch wrote:

> Ingmar Lötzsch schrieb:
>> Hallo,
>>
>> how can I use PreparedStatement to insert or update columns of type
>> bit(n), varbit, ...?
>>
>> I have never figoured out the right way. In former versions of the
>> JDBC-Driver I used setString() as shown below or constructed the whole
>> query string and used Statement.

With the 8.0 and 8.1 driver you would need to write code that is specific
to postgresql using the PGobject class to pass the correct type
information to setObject.

You can does this again with the 8.2 driver if you add the URL parameter
stringtype=unspecified.

I think the best long term approach is for getObject and setObject to
return/take BitSet objects directly so no conversion to string is needed.

Kris Jurka

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: setBlob/getBlob, slony and bytea
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: ParsedStatement Behavior