Thread: Re: HELP PLEASE ~ Re: How to retrieve an array of string using

Re: HELP PLEASE ~ Re: How to retrieve an array of string using

From
Vernon Wu
Date:
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@micro-automation.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@gatewaytech.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@postgresql.org
>> >
>>
>>
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 6: Have you searched our list archives?
>>
>> http://archives.postgresql.org
>>
>>
>
>
>
>