Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

org.postgresql.Driver Problem?

1 view
Skip to first unread message

Ian deSouza

unread,
Jan 8, 2001, 9:15:26 AM1/8/01
to
I think I may be having a problem with the org.postgresql.Driver software
I'm calling:

preparedStatement.setObject(i, value);

where value is of type Boolean (with valid i and value equaled to false
below)and created the column associated with that value as type BIT and I'm
getting the following exception when the preparedStatement is executed.

java.sql.SQLException: ERROR: zpbit_in: t is not a valid bitstring

at org.postgresql.Connection.ExecSQL(Connection.java:393)
at org.postgresql.jdbc2.Statement.execute(Statement.java:273)
at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73)
at
org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:
126)
at Database.insert(Database.java:205)
. . .

Any help would be appreciated.

Thanks, Ian


Ian deSouza

unread,
Jan 8, 2001, 9:56:59 AM1/8/01
to
Sorry, the value was equals to true when I get zpbit_in: t is not a valid bitstring and when value is false I get
zpbit_in: f is not a valid bitstring .
 

James Cribb

unread,
Jan 13, 2001, 1:57:20 AM1/13/01
to
On Mon, 08 Jan 2001 14:15:26 GMT, Ian deSouza <iande...@earthlink.net> wrote:
| I think I may be having a problem with the org.postgresql.Driver software
| I'm calling:
|
| preparedStatement.setObject(i, value);
|
| where value is of type Boolean (with valid i and value equaled to false
| below)and created the column associated with that value as type BIT and I'm
| getting the following exception when the preparedStatement is executed.
|
| java.sql.SQLException: ERROR: zpbit_in: t is not a valid bitstring

If you want to store true/false values in Postgresql then the column of the
table should be of type "bool", not "bit". (The type "bit" means different
things in different DBMSs. Postgresql uses the meaning defined in the ANSI
SQL standard.)

0 new messages