Array Data Type return what type in JDBC? 
Author Message
 Array Data Type return what type in JDBC?

If I have a table

CREATE TABLE test_array (
id char(8) not null,
data integer[] default '{15,0}',
primary key (id)
);

Then

INSERT INTO test_array (id) values ('12345678');

Now

SELECT id,data[1],data[2] FROM test_array;
output

12345678 | 15 | 0
For the data[1] and data[2] I can use ResultSet.getInt(int i)

But what happen if

SELECT id,data FROM test_array;
output

12345678 | {15,0}

What method I should use in JDBC ResultSet.get????(int i)?
Will be getString(int i)? Because I don't see getIntArray(int i) method
from ResultSet interface.

Thank you in advance!



Mon, 23 Feb 2004 02:53:39 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. JDBC Data type error returned: Function sequence error?

2. Data Transfer from Long data type to SQL Server Text data type column

3. Data type conversion error when saving numeric data types

4. Btrieve Numeric Data Types and Microsoft Visual Basic 5 or 6 Data Types

5. conversion of ODBC SQL data types to ODBC C data types

6. Mapping ADO data types with C++ data types

7. Data Type SQL Server7.0 need a non decimal 1 E 19 data type

8. Data Type Problem accessing Btrieve (MBF) data type

9. How to map Oracle data types to java data types

10. ADO data types and vbasic data types mapping

11. Mapping ADO Data Types to SQL Server Data Types

12. Disallowed implicit conversion from data type nvarchar to data type money


 
Powered by phpBB® Forum Software