File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes Result Set from a DB2 stored procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Result Set from a DB2 stored procedure" Watch "Result Set from a DB2 stored procedure" New topic

Result Set from a DB2 stored procedure

Richard Olmstead

Joined: Jun 12, 2006
Posts: 5
Hello colleagues,
My Java call to a DB2 stored procedure isn't working... the error is
String Literals not supported in procedure calls to DB2/390

and, the code is
String inp = "76021592220080101" ;
String sql = "{call ? := G714.GDDPOHP2(?)} " ;

CallableStatement callable = conn.prepareCall( sql );
callable.registerOutParameter(1, java.sql.Types.CHAR);
callable.setString(2, inp);

I'd be grateful for any advice.
I agree. Here's the link:
subject: Result Set from a DB2 stored procedure
Similar Threads
System exception on UserTransaction.commit() , followed by RollbackException
Error while callling stored procedure : Non supported SQL92 token
Oracle procedure works in direct SQL but not via Java
Calling Stored Procedure from Hibernate mapping file
Calling DB2 stored procedures