Skip site navigation (1) Skip section navigation (2)

PreparedStatement.setXXX

From: "Roberta Campo" <rcampo(at)mm(dot)eutelsat(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: PreparedStatement.setXXX
Date: 2005-07-18 11:55:23
Message-ID: dbg5ba$2g9c$3@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-jdbc
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



Responses

pgsql-jdbc by date

Next:From: Dave CramerDate: 2005-07-18 12:35:58
Subject: Re: Timezone conversion woes
Previous:From: Kris JurkaDate: 2005-07-16 04:07:32
Subject: Re: patch to fix jdk 2 compile errors and v2 compatability

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group