BrianMc1958
asked on
Best practice for getting ResultSet from MS SQL stored procedure?
Dear Experts,
Due to technical difficulties, I'm trying to circumvent a PreparedStatement and instead generate and use an MS SQL stored procedure directly. However, I've never done it in Java.
I know how to write the stored procedure itself. But what is the preferred syntax (other than PreparedStatement) to call it and return the ResultSet?
Thanks!
BrianMc1958
Due to technical difficulties, I'm trying to circumvent a PreparedStatement and instead generate and use an MS SQL stored procedure directly. However, I've never done it in Java.
I know how to write the stored procedure itself. But what is the preferred syntax (other than PreparedStatement) to call it and return the ResultSet?
Thanks!
BrianMc1958
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot, folks. Works very nicely.
Maybe that works in MSSQL as well (I've never tried)
prepareStatement( "CALL my_function( ?, ? )" ) ;
for example...