How do you call Stored Procedure in Java ?

Discussion in 'JDBC' started by SoCoooollllllllllllllllll, Dec 11, 2008.

  1. By using CallableStatment object you can call the Stored Procedure.

    Example :

    CallableStatement cstm = connection.prepareCall("Call procedureName");

    ResultSet rs = cstm.execute();
     
  2. anneroberts

    anneroberts Member

    To utilize those demoSp methodology with Connector/J, take after these steps:.
    1. Get ready those callable articulation Eventually Tom's perusing utilizing association. PrepareCall().
    2. Register those yield parameters (if any exist).
    3. Situated the enter parameters (if any exist).
    4. Execute the CallableStatement , Also recover At whatever outcome sets alternately yield parameters.
     

Share This Page