Oracle VARRAY always returns '???' through JDBC
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");
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!
InCircuit Development Corp.
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