Re: setUseServerPrepare & typecasts

From: Scott Lamb <slamb(at)slamb(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: setUseServerPrepare & typecasts
Date: 2002-11-13 22:52:28
Message-ID: 3DD2D7AC.6000703@slamb.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Barry Lind wrote:
> Scott,
>
> If you use ps.setInt(1,42) does it work? I want to isolate the problem.
> In just looking at the code, it seems that the setInt() and setObject()
> methods do the same thing.

Ahh, I'm sorry. setObject(1, new Object(42), Types.INTEGER) doesn't do
it after all. I translated inappropriately when I was writing the email.
setObject(1, null, Types.INTEGER) is the problem. Test function and Java
program attached to reproduce.

Scott

Attachment Content-Type Size
PreparedCastTest.java text/plain 1.1 KB
preparedCastTest.sql text/plain 149 bytes

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Ansley 2002-11-13 23:28:46 JDBC3 and DataSource
Previous Message Varun Kacholia 2002-11-13 17:54:17 Re: Help with JDBC connection...