Connection.prepareCall

Connection.prepareCall

Interface Overview | Interface Members | This Package | All Packages

Syntax
public abstract CallableStatement prepareCall( String sql ) throws SQLException
Parameters
sql
a SQL statement that may contain one or more '?' parameter placeholders. Typically this statement is a JDBC function call escape string.
Returns
a new CallableStatement object containing the pre-compiled SQL statement
Description
A SQL stored procedure call statement is handled by creating a CallableStatement for it. The CallableStatement provides methods for setting up its IN and OUT parameters, and methods for executing it.

Note: This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the prepareCall is done; others may wait until the CallableStatement is executed. This has no direct affect on users; however, it does affect which method throws certain SQLExceptions.

Exceptions
SQLException if a database-access error occurs.