Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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
Marshal
Posts: 34095
337
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic