Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exception when using MS JDBC Driver and calling stored procedures that return OUTPUT parameters

JDBC

Exception when using MS JDBC Driver and calling stored procedures that return OUTPUT parameters

by  Rajeswari  Posted    (Edited  )
Hi !!

I've solved the problem with OUT parameters :p !! This seems to be a problem with the ODBC stack of Microsoft !! Problem does not arise with other drivers !! This problem arises not only with the ODBC-JDBC driver but with apps like Visual Basic, VC++, etc with use MS ODBC stack !!

The solution:

Do not return Resultsets with OUTPUT parameters !! This does not work. The solution is to split the stored procedures into two procedures, one returning the OUTPUT parameter (if required) and another returning the resultset. Another workaround would be to include the OUTPUT parameter as another Column in the Resultset !! MS ODBC, JDBC client drivers do NOT allow you to return OUTPUT parameters with resultsets !! If you return either one of them alone no problem comes !!

Hope this helps you people out there facing the same problem ;)

- Rajeswari
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top