Re: Bit string type in PreparedStatement - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Bit string type in PreparedStatement
Date
Msg-id 425EE184.8060303@opencloud.com
Whole thread Raw
In response to Bit string type in PreparedStatement  (bst <bst_co@yahoo.com>)
Responses Getting the number or row returned by a select. Alway tought it was not possible until I say pgAdmin who gives it
List pgsql-jdbc
bst wrote:

> CREATE TABLE test (a BIT(8));

> How can I set bit string field in PreparedStatement?

As far as I can tell, there's no standard way to do this; the JDBC spec
thinks BIT is just like BOOLEAN.

You could use setString() and an explicit cast to bit(8) in your query,
perhaps..

-O

pgsql-jdbc by date:

Previous
From: Nelson Arapé
Date:
Subject: Re: process large tables
Next
From: Vernon
Date:
Subject: Error with a hibernate query