File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Informix and Blob and CallableStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Informix and Blob and CallableStatement" Watch "Informix and Blob and CallableStatement" New topic

Informix and Blob and CallableStatement

Kishore Nair

Joined: Nov 30, 2004
Posts: 10
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
if( DEBUG )
System.out.println("Binding of smart large object to table is done");

catch(SQLException se)

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?

Never resign to your fate
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33106

What is in the statement object?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Kishore Nair

Joined: Nov 30, 2004
Posts: 10
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 ]
I agree. Here's the link:
subject: Informix and Blob and CallableStatement
It's not a secret anymore!