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 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
Bookmark "Informix and Blob and CallableStatement" Watch "Informix and Blob and CallableStatement" New topic
Author

Informix and Blob and CallableStatement

Kishore Nair
Greenhorn

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
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?


Never resign to your fate
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30299
    
150

Kishore,
What is in the statement object?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Kishore Nair
Greenhorn

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: http://aspose.com/file-tools
 
subject: Informix and Blob and CallableStatement