apache > db
Apache DB Project
 
Font size:      

CallableStatements and OUT Parameters

CallableStatements and OUT Parameters

Derby supports OUT parameters and CALL statements that return values, as in the following example:

CallableStatement cs = conn.prepareCall(
   "? = CALL getDriverType(), CAST (? AS INT)");
cs.registerOutParameter(1, INT);
cs.setInt(2, 35);
cs.executeUpdate();

Note:
Using a CALL statement with a procedure that returns a value is only supported with the ? = syntax.

Register the output type of the parameter before executing the call.


Previous Page
Next Page
Table of Contents
Index