This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help on Stored Procedure Call with CLOB as IN Parameters

 
Chintan B Shah
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic