Re: PreparedStatement.setXXX

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Roberta Campo <rcampo(at)mm(dot)eutelsat(dot)org>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: PreparedStatement.setXXX
Date: 2005-07-18 13:52:37
Message-ID: A8C2BE1D-2BAC-4B55-BAB0-E8DFF456E901@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Roberta,

You can force version 2 protocol with protocolVersion=2

or you can implement the Array interface.

For putting information into the db, I would imagine all you need to
implement is everything up to getResultSet()

Dave
On 18-Jul-05, at 7:55 AM, Roberta Campo wrote:

> We're moving from Postgresql7.4 to v.8.0.3,
> with some problems rising from the strictness of the new driver
> postgresql-8.0-311.jdbc3.jar.
>
> We used to call a function f(integer[]) using
> PreparedStatement.setString('{...}')
> but now the types are not compatible.
>
>
> How should we fix that ?
>
> A. Using the setArray method :
> This requires the implementation of the interface java.sql.Array :
> - which methods are required in this case ?
> - is there any available implementation of this class ? :)
>
> B. Using the setObject(colnumber, String, type ) method :
> This should require less implementation than the Array, shouldn't it ?
> - how to specify the type int[] ?
>
> C. Using different drivers / protocol versions / ...
>
> Thanks,
> Roberta
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>

Dave Cramer
davec(at)postgresintl(dot)com
www.postgresintl.com
ICQ #14675561
jabber davecramer(at)jabber(dot)org
ph (519 939 0336 )

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message sumit shah 2005-07-18 14:16:48 Re: PreparedStatement.setXXX
Previous Message Dave Cramer 2005-07-18 12:35:58 Re: Timezone conversion woes