Re: arrays as parameters in callableStatements - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: arrays as parameters in callableStatements
Date
Msg-id Pine.BSO.4.63.0605150441580.8631@leary2.csoft.net
Whole thread Raw
In response to Re: arrays as parameters in callableStatements  ("J." <sweepingoar@yahoo.com>)
List 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


pgsql-jdbc by date:

Previous
From: Simon Riggs
Date:
Subject: Re: postgreSQL or derby for an enterprise application
Next
From: "Jason Porter"
Date:
Subject: JPOX Types.CHAR error