On Thu, 6 Feb 2003 19:11:15 -0500 "Eric B. Ridge" <ebr@tcdi.com> wrote:
> On Thursday, February 6, 2003, at 06:18 PM, Richard Welty wrote:
> > out, e.g. i can extract an int [] easily but i have to convert it to an
> > Integer [] in order to write it back out. it can't really be this bad,
> > can it?
> Postgres is cool in that you can do a stmt.setString(...) (if using
> prepared statements) for any datatype, including arrays.
> Postgres' string form of an array is (in its simplest form):
> {1, 2, 3, N}
> or
> {"a", "b", "c", "N"}
> So you can convert your int[] into a String in the above form and just
> do:
> stmt.setString(3, Helper.arrayToPostgresString(myIntArray));
ah, ok, thanks. my path is now clear.
richard
--
Richard Welty rwelty@averillpark.net
Averill Park Networking 518-573-7592
Unix, Linux, IP Network Engineering, Security