Redigera

Dela via


SQLServerCallableStatement Class

Download JDBC driver

Lets you specify the stored procedure name to call along with input and output parameters. This class also provides the ability to retrieve the return status value with the ? = call( ?, ..) syntax.

Package: com.microsoft.sqlserver.jdbc

Implements: ISQLServerCallableStatement

Extends: SQLServerPreparedStatement

Syntax

  
public final class SQLServerCallableStatement  

Remarks

SQLServerCallableStatement lets you specify the stored procedure name to call along with input and output parameters. SQLServerCallableStatement also provides the ability to retrieve the return status value with the ? = call( ?, ..) syntax.

This class supports unwrapping to SQLServerCallableStatement class, ISQLServerCallableStatement interface, java.sql.CallableStatement interface, and the classes and interfaces supported by SQLServerPreparedStatement for unwrapping. For more information, see Wrappers and Interfaces.

When one of the SQLServerCallableStatement set methods is called for a type, if that type conflicts with the type specified with registerOutParameter, the type specified by the last SQLServerCallableStatement set method is used. However, this may cause incompatible data type conversion errors. If a SQLServerCallableStatement set method is not called, the type specified with the first registerOutParameter call is used.

The SQL Server JDBC Driver 3.0 is compliant with the JDBC 4.0 recommendation that a result set and update counts must be retrieved before retrieving OUT parameters. If OUT parameters are retrieved before the result set and update counts have been completely processed, any result sets and update counts that have not been processed are lost.

See Also

SQLServerCallableStatement Members
JDBC Driver API Reference