Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Informix and Blob and CallableStatement

 
Kishore Nair
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a stored proc in Informix, which looks like this update_business_object(String,Blob)
This is the code I have:
IfmxCallableStatement ifxCstmt = (IfmxCallableStatement)ifxCon.prepareCall(statement);
ifxCstmt.setString(1, "holidays");
ifxCstmt.setBlob(2, ifb);
IFB is a Ifx blob
try
{
ifxCstmt.execute();
if( DEBUG )
{
System.out.println("Binding of smart large object to table is done");
}

}
catch(SQLException se)
{
se.printStackTrace();
}

This throws a "Unable to resolve procedure" on the execute(). We know for sure that the signature is correct and the proc exists. Any ideas?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35977
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kishore,
What is in the statement object?
 
Kishore Nair
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what the statement looks like
String statement = "{call update_business_object(?,?)}";

I have also tried a PreparedStatement which looks like this
"Execute Procedure update_business_object(?,?). Neither one of them work. I can do a prepared statement with "INSERT INTO table_name......" and that works fine. But big bad corporate audit teams want me to call a stored procedure because it is more "secure" :-)
[ December 01, 2004: Message edited by: Kishore Nair ]
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!