#include <callablestatement.h>
Inheritance diagram for odbc::CallableStatement:
A CallableStatement
extends the functionality of a PreparedStatement
, by allowing output parameters.
The ODBC escapes for calling stored procedures and functions should be used. A procedure call is prepared like this:
CallableStatement* cstmt=con->prepareCall ("{call my_procedure(?,?,?)}");
And for a function call (a procedure that returns a value), the following syntax should be used:
CallableStatement* cstmt=con->prepareCall ("{?=call my_function(?,?)}");
All parameters in a CallableStatement
are treated as input/output parameters, unless they are registered as output-only parameters with registerOutParameter(). Note that output-only parameters must be registered with their proper SQL type prior to executing a CallableStatement
.
|
Fetches a parameter as a bool.
idx | The parameter index, starting at 1 |
|
Fetches a parameter as a signed char.
idx | The parameter index, starting at 1 |
|
|
|
Fetches a parameter as a double.
idx | The parameter index, starting at 1 |
|
Fetches a parameter as a float.
idx | The parameter index, starting at 1 |
|
Fetches a parameter as an int.
idx | The parameter index, starting at 1 |
|
Fetches a parameter as a Long.
idx | The parameter index, starting at 1 |
|
Fetches a parameter as a short.
idx | The parameter index, starting at 1 |
|
Fetches a parameter as a string.
idx | The parameter index, starting at 1 |
|
|
|
Registers an output parameter with a given scale.
idx | The parameter index, starting at 1 |
sqlType | The SQL type of the parameter |
scale | The scale of the parameter. |
|
Registers an output parameter.
idx | The parameter index, starting at 1 |
sqlType | The SQL type of the parameter |