Unix Technical Forum

jdbc, stored procedures and clobs

This is a discussion on jdbc, stored procedures and clobs within the Informix forums, part of the Database Server Software category; --> I have a simple stored procedure: create procedure test(my_clob clob) returning clob; set debug file to '/tmp/test.log'; trace on; ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 07:38 AM
mark stephens
 
Posts: n/a
Default jdbc, stored procedures and clobs

I have a simple stored procedure:

create procedure test(my_clob clob)
returning clob;
set debug file to '/tmp/test.log';
trace on;
return my_clob;
end procedure;

I'm calling this way via jdbc:

StringReader stream1 = new StringReader(scripts);
CallableStatement cs = conn.prepareCall("{ ? = call markTest(?) }");
//cs.setString(1, scripts);
cs.setCharacterStream(1, stream1, scripts.length());
cs.execute();
conn.close();

Setting with a character stream I get this:

java.sql.SQLException: Type not supported

If I try and pass a string I get this:

java.sql.SQLException: blob_input: cannot convert LO from argument string


Here is my configuration:

Informix Dynamic Server 9.30.HC5X4
IBM Informix JDBC Driver Version 2.21.JC5
HP-UX B.11.11 U 9000/800 145444606
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:26 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com