Tuesday, February 6, 2007

what are the advantages of callable statements over prepared statements?

CallableStatement inherits Statement methods, which deal with SQL statements in general, and it also inherits PreparedStatement methods, which deal with IN parameters. All of the methods defined in CallableStatement deal with OUT parameters>OUT parameters or the output aspect of INOUT parameters: registering the JDBC types of the OUT parameters, retrieving values from them, or checking whether a returned value was JDBC NULL. Whereas the getter methods defined in ResultSet (getString, getLong, and so on) retrieve values from a result set, the getter methods in CallableStatement retrieve values from the OUT parameters and/or return value of a stored procedure

SOURCE : www.referjava.com

No comments: