Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLOutput.writeArray howto

843854May 7 2005 — edited May 11 2005
Hello

I've met a little problem. Need to write java object to oracle object, but object contains an java array. How to cast it to java.sql.Array? Thought about oarcle.sql.ARRAY, but Connection object is needed for that and i have not.

example

public class test implements SQLData {
long n;
Object[] troubleArray; // need to write
...............
public void writeSQL(SQLOutput stream) throws SQLException {
stream.writeLong(n.longValue());
stream.writeArray(...); // input parameter is java.sql.Array
}
..............
}

HOW TO DO THAT??? Please help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2005
Added on May 7 2005
2 comments
204 views