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-14 01:20:33
Message-ID: 3DD2FA61.2070502@slamb.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Scott Lamb wrote:
> Aaron Mulder wrote:
>> But I don't think you're supposed to use setObject for a null
>> value. Instead, try
>>
>> setNull(1, Types.INTEGER)
>
> Hmm. Yeah, I guess the API docs don't really describe what setObject is
> supposed to do on null. But setNull(1, Types.INTEGER) seems to have the
> same problem.

Ahh, but the JDBC 3.0 specification does. Section 13.2.2.3 says "if a
Java null is passed to any of the setter methods that take a Java
object, the parameter will be set to JDBC NULL". So it should work.

Thanks,
Scott

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Aaron Mulder 2002-11-14 01:57:27 Re: setUseServerPrepare & typecasts
Previous Message Scott Lamb 2002-11-14 01:16:22 Re: setUseServerPrepare & typecasts