OCIBindArrayOfStruct
Description : You can call this function to set the skip parameters for a static array bind.
Function prototype :
sword OCIBindArrayOfStruct (
OCIBind * bindp,
OCIError *errhp,
ub4 pvskip,
ub4 indskip,
ub4 alskip,
ub4 rcskip );
Parameters :
| Parameter | Description |
|---|---|
| bindp (IN) | The handle to a bind structure. |
| errhp(IN/OUT) | An error handle. |
| pvskip(IN) | The size of the interval between two values. When multiple rows are returned at a time, OBCI backfills the value for each row based on this size. |
| indskip(IN) | The size of the interval between two null value indicators. |
| alskip (IN) | The size of the interval between two return value length indicators. |
| rcskip(IN) | The number of bytes skipped during multi-row binding. |
Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.
OCIBindByName
Description : You can call this function to bind parameters in an SQL statement by parameter name.
Function prototype :
sword OCIBindByName (
OCIStmt *stmtp,
OCIBind **bindpp,
OCIError *errhp,
CONST text *placeholder,
sb4 placeh_len,
dvoid *valuep,
sb4 value_sz,232
ub2 dty,
dvoid *indp,
ub2 *alenp,
ub2 *rcodep,
ub4 maxarr_len,
ub4 *curelep,
ub4 mode );
Parameters :
| Parameter | Description |
|---|---|
| stmtp(IN) | The handle to the statement being processed. |
| bindp(OUT) | The handle to a bind structure. |
| errhp(IN/OUT) | An error handle. |
| placeholder(IN) | The name of the parameter that is bound. |
| placeh_len(IN) | The length of the parameter name. |
| valuep(IN) | The pointer to a parameter value buffer. |
| value_sz(IN) | The size of a single value of the parameter type. |
| dty(IN) | The data type of a parameter. |
| indp(IN) | A reserved parameter. Set this parameter to NULL. |
| alenp(IN) | A reserved parameter. Set this parameter to NULL. |
| rcodep(IN) | A reserved parameter. Set this parameter to NULL. |
| maxarr_len(IN) | A reserved parameter. |
| curelep(IN) | A reserved parameter. Set this parameter to NULL. |
| mode(IN) | The mode of binding. OBCI V1.2.0 only supports OCI_DEFAULT, which is the default mode. |
Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.
OCIBindByPos
Description : You can call this function to bind a parameter based on its position in an SQL statement.
Function prototype :
sword OCIBindByPos (
OCIStmt *stmtp,
OCIBind **bindp,
OCIError *errhp,
ub4 position,
dvoid *valuep,
sb4 value_sz,
ub2 dty,
dvoid *indp,
ub2 *alenp,
ub2 *rcodep,
ub4 maxarr_len,
ub4 *curelep,233
ub4 mode );
Parameters :
| Parameter | Description |
|---|---|
| stmtp(IN) | The handle to the statement being processed. |
| bindp(OUT) | The handle to a bind structure. |
| errhp(IN/OUT) | An error handle. |
| position(IN) | The position of the parameter in an SQL statement. The value starts from 1. |
| valuep(IN) | The pointer to a parameter value buffer. |
| value_sz(IN) | The size of a single value of the parameter type. |
| dty(IN) | The data type of a parameter. |
| indp(IN) | A reserved parameter. Set this parameter to NULL. |
| alenp(IN) | A reserved parameter. Set this parameter to NULL. |
| rcodep(IN) | A reserved parameter. Set this parameter to NULL. |
| maxarr_len(IN) | A reserved parameter. |
| curelep(IN) | A reserved parameter. Set this parameter to NULL. |
| mode(IN) | The mode of binding. OBCI V1.2.0 only supports OCI_DEFAULT, which is the default mode. |
Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.
OCIDefineArrayOfStruct
Description : You can call this function to specify additional attributes necessary for binding an array of structures, such as columns.
Function prototype :
sword OCIDefineArrayOfStruct (
OCIDefine *defnp,
OCIError *errhp,
ub4 pvskip,
ub4 indskip,
ub4 rlskip,
ub4 rcskip );
Parameters :
| Parameter | Description |
|---|---|
| defnp (IN) | The handle to a bind structure. |
| errhp(IN/OUT) | An error handle. |
| pvskip(IN) | The size of the interval between two values. When multiple rows are returned at a time, OBCI backfills the value for each row based on this size. |
| indskip(IN) | The size of the interval between two null value indicators. |
| rlskip (IN) | The size of the interval between two return value length indicators. |
| rcskip(IN) | The number of bytes skipped during multi-row binding. |
Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.
OCIDefineByPos
Description : You can call this function to bind the value range of each column in a return value set by the position of the value.
Function prototype :
sword OCIDefineByPos (
OCIStmt *stmtp,
OCIDefine **defnpp,
OCIError *errhp,
ub4 position,
dvoid *valuep,
sb4 value_sz,
ub2 dty,
dvoid *indp,
ub2 *rlenp,
ub2 *rcodep,
ub4 mode );
Parameters :
| Parameter | Description |
|---|---|
| stmtp(IN) | The handle to the statement being processed. |
| defnp(OUT) | The output pointer to a bind structure. You can use this parameter to call the OCIDefineArrayOfStruct() function and specify the interval between two values in the column. |
| errhp(IN/OUT) | An error handle. |
| position(IN) | The position of the parameter in an SQL statement. The value starts from 1. |
| valuep(IN) | The pointer to a parameter value buffer. |
| value_sz(IN) | The size of a single value of the parameter type. |
| dty(IN) | The data type of a parameter. |
| indp(IN) | The pointer to an indicator buffer. If a NULL value exists in the result set, OBCI backfills the buffer and sets its position to -1, or 0 in other cases. If the indicator buffer has not been set during the binding, but a NULL value exists in the result, the function returns an OCI_ERROR error. |
| rlenp(IN) | The pointer to the indicator buffer of the length of the return value. If the return value is not truncated, the value in the buffer is the actual length of the return value. If the return value is truncated when it is fetched, the value in the buffer is the length of this value before truncation. If the return value is null, the value in the buffer is set to 0. |
| rcodep(IN) | A reserved parameter. |
| mode(IN) | The mode of binding. OBCI V1.2.0 only supports OCI_DEFAULT, which is the default mode. |
Return value : OCI_SUCCESS if succeeded, or OCI_ERROR if failed.