From: | Vernon Wu <vernonw(at)gatewaytech(dot)com> |
---|---|
To: | Dave Cramer <Dave(at)micro-automation(dot)net>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: HELP PLEASE ~ Re: How to retrieve an array of string using |
Date: | 2002-06-16 21:55:10 |
Message-ID: | OIHCRL322Y6MKMICGDKGVS1XMK1YWQ.3d0d093e@kimiko |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Thanks Dave for your response.
The data defined in a PgSQL table is array of string. So I assume that is "String []" in Java code. Here is how I tried to
retrieved the field of data
ResultSet rs = ...
String [] d = (String [])rs.getArray(i++);
The compiler says that it can't cast from java.sql.array to String[], or type mismatch for
String [] d = re.getArray{i++);
Do I miss a very easy way to get it done?
Thanks,
Vernon
6/18/2002 4:09:35 AM, Dave Cramer <Dave(at)micro-automation(dot)net> wrote:
>Vernon,
>
>this sounds too easy but getArray doesn't work?
>
>Dave
>On Sun, 2002-06-16 at 16:34, Vernon Wu wrote:
>>
>> Can anyone please give me some information in regarding of this array data type and jdbc question?
>>
>> 6/16/2002 9:52:03 PM, Vernon Wu <vernonw(at)gatewaytech(dot)com> wrote:
>>
>> >
>> >I use the array data type in some DB tables, and use JDBC to make the connection between DB and the
application..
>> >After one or two hours' research on the PGSQL-jdbc archive and Java.sun, I haven't find out how to retrieve array
>> from
>> >the tables. Is it something can be done or not?
>> >
>> >Thanks in advance.
>> >
>> >Vernon
>> >
>> >
>> >
>> >---------------------------(end of broadcast)---------------------------
>> >TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>> >
>>
>>
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 6: Have you searched our list archives?
>>
>> http://archives.postgresql.org
>>
>>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2002-06-17 10:09:04 | [Fwd: [Fwd: Re: solved: fastpath error?]] |
Previous Message | Vernon Wu | 2002-06-16 20:34:24 | HELP PLEASE ~ Re: How to retrieve an array of string using JDBC? |