Re: jdbc and ARRAYs - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: jdbc and ARRAYs
Date
Msg-id 40ABA36E-B39E-40CE-979D-627EF0EDFE4B@fastcrypt.com
Whole thread Raw
In response to jdbc and ARRAYs  (NosyMan <nosyman@gmail.com>)
Responses Re: jdbc and ARRAYs  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-jdbc
You have to implement the java.sql.Array interface and pass that in.
search the list, there's a few references to this question and some
code.

Dave
On 2-Dec-05, at 4:42 AM, NosyMan wrote:

> Hi everyone,
>
> I have some problems trying to use a preparedStatement with an array
> parameter. The problem is I don't know how to do it :-(
>
> CREATE OR REPLACE FUNCTION MyFunction( id INTEGER, anArray
> VARCHAR[] )..........................
>
>
> pstat = conn.prepareStatement("SELECT * FROM MyFunction(?,?)");
> pstat.setInt(1, 30);
> pstat.setArray(2, ??????????);
>
> Can you tell me how can I construct the array for parameter number 2?
>
> Thanks,
> NosyMan
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>


pgsql-jdbc by date:

Previous
From: NosyMan
Date:
Subject: jdbc and ARRAYs
Next
From: Achilleus Mantzios
Date:
Subject: Re: jdbc and ARRAYs