Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members
odbc::CallableStatement Class Reference
A prepared statement suited for stored procedure calls.
More...
#include <callablestatement.h>
Inheritance diagram for odbc::CallableStatement::
List of all members.Public Methods
Detailed Description
A prepared statement suited for stored procedure calls.
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.
Member Function Documentation
| bool odbc::CallableStatement::getBoolean |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a bool.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| signed char odbc::CallableStatement::getByte |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a signed char.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| Bytes odbc::CallableStatement::getBytes |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a Bytes object.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| Date odbc::CallableStatement::getDate |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a Date.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| double odbc::CallableStatement::getDouble |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a double.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| float odbc::CallableStatement::getFloat |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a float.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| int odbc::CallableStatement::getInt |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as an int.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| Long odbc::CallableStatement::getLong |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a Long.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| short odbc::CallableStatement::getShort |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a short.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| std::string odbc::CallableStatement::getString |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a string.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| Time odbc::CallableStatement::getTime |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a Time.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| Timestamp odbc::CallableStatement::getTimestamp |
( |
int |
idx |
) |
|
|
|
|
Fetches a parameter as a Timestamp.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| void odbc::CallableStatement::registerInParameter |
( |
int |
idx |
) |
|
|
|
|
Registers an input only parameter.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
|
| void odbc::CallableStatement::registerOutParameter |
( |
int |
idx, |
|
|
int |
sqlType, |
|
|
int |
scale |
|
) |
|
|
|
|
Registers an output parameter with a given scale.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
| sqlType |
The SQL type of the parameter |
| scale |
The scale of the parameter. |
-
See also:
-
Types
|
| void odbc::CallableStatement::registerOutParameter |
( |
int |
idx, |
|
|
int |
sqlType |
|
) |
|
|
|
|
Registers an output parameter.
-
Parameters:
-
| idx |
The parameter index, starting at 1 |
| sqlType |
The SQL type of the parameter |
-
See also:
-
Types
|
The documentation for this class was generated from the following file: