A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Databases
»
JDBC
Author
How can get the return code of a StoreProcedure?
Li Shangqiang
Greenhorn
Joined: Mar 25, 2001
Posts: 22
posted
Oct 17, 2001 07:16:00
0
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
SimplyEd Me
Greenhorn
Joined: Oct 18, 2001
Posts: 1
posted
Oct 18, 2001 23:42:00
0
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();
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: How can get the return code of a StoreProcedure?
Similar Threads
how to capture http request and force return response
Getting an index from a parser
JVMIT IterateOverInstancesOfClass
Session Advice
Help with returning one string from three methods of type string?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter