Saturday, 1 September 2012

How do we call a stored procedure from JDBC?


• The foremost step is to create a CallableStatement object. 

• With the Statement and PreparedStatement object ,it is done with an open
Connection object. 

• A CallableStatement object contains a call to a stored procedure.

Code:

CallableStatement cs = con.prepareCall("{call SHOW_Sales}");
ResultSet rs = cs.executeQuery();

No comments:

Post a Comment