Thread: arrays and jdbc

arrays and jdbc

From
Richard Welty
Date:
i'm about to start on something which will be accessing arrays through the
pgjdbc2 driver.

is there anything i should know, or should i just have at it? should i just
step through a row in the result set in numeric order, or is there a way of
representing a specific array values in the row, that is, could i do
something like

int pct = resultset.getInt("percentage[1]");

to get element one of int4 array percentage?

thanks,
  richard
--
Richard Welty                                         rwelty@averillpark.net
Averill Park Networking                                         518-573-7592
              Unix, Linux, IP Network Engineering, Security

Re: arrays and jdbc

From
Dave Cramer
Date:
Richard,

You need to use the java.sql.Array interface to get at array objects

Dave
On Fri, 2003-01-31 at 17:51, Richard Welty wrote:
> i'm about to start on something which will be accessing arrays through the
> pgjdbc2 driver.
>
> is there anything i should know, or should i just have at it? should i just
> step through a row in the result set in numeric order, or is there a way of
> representing a specific array values in the row, that is, could i do
> something like
>
> int pct = resultset.getInt("percentage[1]");
>
> to get element one of int4 array percentage?
>
> thanks,
>   richard
> --
> Richard Welty                                         rwelty@averillpark.net
> Averill Park Networking                                         518-573-7592
>               Unix, Linux, IP Network Engineering, Security
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
--
Dave Cramer <Dave@micro-automation.net>


Re: arrays and jdbc

From
Richard Welty
Date:
On 01 Feb 2003 11:30:56 -0500 Dave Cramer <Dave@micro-automation.net> wrote:
> You need to use the java.sql.Array interface to get at array objects

thanks, yes, i see that now.

my apologies for not doing my research first. if i posted like this on the
openbsd misc list, they'd be taking me apart for that offense right now.

richard
--
Richard Welty                                         rwelty@averillpark.net
Averill Park Networking                                         518-573-7592
              Unix, Linux, IP Network Engineering, Security