Re: server-side prepared

From: Scott Lamb <slamb(at)slamb(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: server-side prepared
Date: 2003-01-08 19:26:32
Message-ID: 3E1C7B68.9000501@slamb.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Felipe Schnack wrote:

> I just can't use server-side prepared statements
> Here is a snippet of my sources, note that the column I'm inserting is
> of "bigint" data type
> PreparedStatement prep = Connection.prepareStatement("insert into
> tablename values (?)");
> prep.setNull(1, Types.BIGINT);
> prep.executeUpdate();
> For some strange reasons when I execute that I get the following
> error: "Column 'cpf' is of type BIGINT, but expression is of type text"
> Well, I specified the BIGINT type correctly, What can I do?
>
>

Are you using the latest CVS release? I encountered this bug, too -
you'll probably find setting a non-null integer value works, but it
always thinks nulls are of type text. It was fixed in CVS a while ago,
but that version wasn't released with 7.3.0 or 7.3.1.

Scott

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2003-01-08 19:31:02 Re: server-side prepared
Previous Message Felipe Schnack 2003-01-08 19:17:32 Re: synchronized code