File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Need help on Stored Procedure Call with CLOB as IN Parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Need help on Stored Procedure Call with CLOB as IN Parameters" Watch "Need help on Stored Procedure Call with CLOB as IN Parameters" New topic
Author

Need help on Stored Procedure Call with CLOB as IN Parameters

Chintan B Shah
Ranch Hand

Joined: Sep 23, 2008
Posts: 83
Hi Folks,

I need to call a stored procedure where 2 of its IN parameters are of CLOB data type.

Stored procedure looks something like this


I have to query another application(through web-service) to get Emails, subject , body. I get all of those as String.

So I wrote the code that uses a callable statement and does following


No errors, exceptions are thrown. Code just stops while executing those lines and exits.

ENV: JDK1.6, OJDBC14.JAR in class path.

Any help on troubleshooting this is much appreciated.

Best Regards,
Chintan.


SCJA 1.0
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
As far as I remember setString will do the trick for reasonable length Strings in newer drivers. But you should check the documentation for details.

By the way you must also use appropriate driver for your database version.

Regards,
Fatih.
Chintan B Shah
Ranch Hand

Joined: Sep 23, 2008
Posts: 83
Hi Fatih,

Yes, you are right. I was googling around more after posting this topic and found this link

String To Clob in Java

which also says the same thing.

setString did work for my scenario.

Thanks much.

Best Regards,
Chintan.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help on Stored Procedure Call with CLOB as IN Parameters
 
Similar Threads
Java Stored Procedure
Testing a simple Oracle PL SQL function using toad sql client?
how to get the result from oracle procedure it is returning refcursor