Re: arrays as parameters in callableStatements

From: Kris Jurka <books(at)ejurka(dot)com>
To: "J(dot)" <sweepingoar(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: arrays as parameters in callableStatements
Date: 2006-05-15 09:47:23
Message-ID: Pine.BSO.4.63.0605150441580.8631@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sun, 14 May 2006, J. wrote:

> Thanks, I thought that might be an issue, but looking at the API, I
> don't see how to convert an array or ArrayList to an Array object or
> back. Any tips on where to look?
>

For java.sql.Array -> type[] it's easy, the Array.getArray call will
return a String[] or int[] or whatever typed array is appropriate.

The type[] -> java.sql.Array side is more complicated, searching this
lists archives will give you some example, but the basic idea is that you
create a class that implements java.sql.Array and can therefore accept any
input format you need.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jason Porter 2006-05-15 14:19:42 JPOX Types.CHAR error
Previous Message Simon Riggs 2006-05-15 07:28:42 Re: postgreSQL or derby for an enterprise application