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!

createClob variable

843859Sep 26 2007 — edited Sep 28 2007
Hi

I need to create a Clob variable that will be filled with some text. After that I will use this variable in a stored procedure.
I'm using the following code:

Connection conn = null;
Clob c = null;

conn = db.getConnection();
c = conn.createClob();

//c.setString(1, "text text text");



I'm getting java.lang.NullPointerException in this line c = conn.createClob();.
Anyone know what I'm doing wrong, or if there is another way to create a Clob variable?

Thanks in advance.
Luís Matos

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2007
Added on Sep 26 2007
14 comments
7,292 views