...
The Callable Statement functions are used execute stored procedures and to manage the result. The DBErrorUDR
is used to handle SQL errors.
prepareCall
To prepare a call with an out parameter, the Stored Procedure must be defined with the prepareCall
function.
...
Parameter | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Name of the database, including the folder name | ||||||||||||
| Name of the stored procedure, including a question mark for each parameters it requires
| ||||||||||||
| Optional parameter that controls error handling. If the parameter's value is set to true, any SQL error gets captured, without disrupting the execution. For more information about how to fetch the SQL error code and message, see the section below, getError. This parameter is set to | ||||||||||||
isFunction | Optional parameter that indicates that the call will be made for a stored function. This parameter is set to false by default. | ||||||||||||
inclResultParam | Optional parameter that you can set to true to apply a result parameter of ?= on the JDBC API stored procedure SQL escape syntax. If the isFunction parameter is set to true, the inclResultParam will be set to true by default. | ||||||||||||
Returns | Callable Statement Identifier. This object is threadsafe and is used when executing calls towards the stored procedure. |
execute
The execute
function maps to the corresponding JDBC API and could differ slightly depending on the JDBC driver.
...
Parameter | Description |
---|---|
| The Callable Statement Identifier that is returned from the |
| The values expected by the stored procedure declared in the The parameters must have the same type as defined in the stored procedure. |
Returns | The returned value is the Result Identifier of the execution. A new object is returned for every call executed. |
executeQuery
The executeQuery
function maps to the corresponding JDBC API and could differ slightly depending on the JDBC driver.
...
Parameter | Description |
---|---|
| The Callable Statement Identifier that is returned from the |
| The values expected by the stored procedure declared in the The parameters must have the same type as defined in the stored procedure. |
Returns | The returned value is the Result Identifier of the execution. A new object is returned for every call executed. |
executeUpdate
The executeUpdate
function maps to the corresponding JDBC API and could differ slightly depending on the JDBC driver.
...
Parameter | Description |
---|---|
| The Callable Statement Identifier that is returned from the |
| The values expected by the stored procedure declared in the The parameters must have the same type as defined in the stored procedure. |
Returns | The returned value is the Result Identifier of the execution. A new object is returned for every call executed. |
get
The get
function is used to retrieve the result from the executed call.
...
Parameter | Description | |||||
---|---|---|---|---|---|---|
| The Result Identifier that is returned from the | |||||
| Index of the requested parameter from the stored procedure (type | |||||
Returns | The value of the out parameter
|
getUpdateCount
This function returns the number of rows that was affected by the executeUpdate
function.
...
Parameter | Description |
---|---|
| The Result Identifier that is returned from the |
Returns | The number of rows in the database that was affected by the call. If an update exists -1 will be returned. |
getError
Anchor | ||||
---|---|---|---|---|
|
This function will capture potential SQL errors from the executeUpdate
function and return a UDR that contains both the error code and the error message.
...
Info | ||
---|---|---|
| ||
Stored Procedure definition:
|
DBErrorUDR
Anchor | ||||
---|---|---|---|---|
|
If the executeUpdate
function generates an SQL error, the getError
function will generate a DBErrorUDR
.
...