Forums Register Login

How can get the return code of a StoreProcedure?

+Pie Number of slices to send: Send
in my store procedures, sometime i return some numbers; but how can i get it? In this case getResultSet() generate a error, getUpdateCount() return -1. My database is SQL Server, and dirver is JDBC-ODBC Bridge
+Pie Number of slices to send: Send
E.g.
final String sqlCallDEPRejects = "{? = call dep_rejects (?)}";
CallableStatement cstmt = con.prepareCall(sqlCallDEPRejects);
cstmt.registerOutParameter(1,java.sql.Types.INTEGER);
cstmt.setString(2, "2" + " ");
cstmt.execute();
int totalMoved = cstmt.getInt(1);
cstmt.close();
Hoo hoo hoo! Looks like we got a live one! Here, wave this tiny ad at it:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 703 times.
Similar Threads
Getting an index from a parser
how to capture http request and force return response
JVMIT IterateOverInstancesOfClass
Help with returning one string from three methods of type string?
Session Advice
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:53:13.