-
Oracle VARRAY always returns '???' through JDBC
Hi,
I'm using the following test code to retrieve and print out a VARRAY column from an Oracle database:
Statement stmt = conn.createStatement ();
ResultSet rs = stmt.executeQuery("SELECT * FROM email_queue");
rs.next();
rs.next();
rs.next();
ARRAY array = ((oracle.jdbc.OracleResultSet)rs).getARRAY("email_send_to");
String[] values = (String[]) array.getArray();
for (int i = 0; i < values.length; i++)
{
System.out.println( "index " + i + " = " + values[i] );
}
(The 3 rs.next() is just to manually advance to the 3rd row.)
The printed result is invariably "???" (for each member of the VARRAY). It should be e-mail addresses.
Other info: it's Oracle 9i, using the Oracle JDBC thin driver v9.0.1, with JRE 1.5.0_02, all on Windows 2000.
I've Googled this and searched several forums to no avail. Any help is GREATLY appreciated!
--Glen Ford
InCircuit Development Corp.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks