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

jdbc and ARRAYs

From: NosyMan <nosyman(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: jdbc and ARRAYs
Date: 2005-12-02 09:42:38
Message-ID: 200512021142.38982.nosyman@gmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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


Responses

pgsql-jdbc by date

Next:From: Dave CramerDate: 2005-12-02 13:20:14
Subject: Re: jdbc and ARRAYs
Previous:From: Kris JurkaDate: 2005-12-02 03:13:53
Subject: Re: Statement.cancel() race condition

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