Library: OCI
Include: omoci.xin
|
Returns: Numeric
Returns OCI_SUCCESS if the function completes without error.
|
Declaration define external counter function OCI_obindps
( read-only OCI_Handle_type cursor,
value counter opcode,
value stream sqlvar,
value counter sqlvl,
read-only OCI_Array_type pvctx,
value counter progvl,
value counter ftype,
read-only OCI_Array_type indp,
read-only OCI_Array_type alen,
read-only OCI_Array_type arcode,
value counter pv_skip,
value counter ind_skip,
value counter alen_skip,
value counter rc_skip,
value counter maxsiz,
modifiable counter cursiz
)
Purpose
This function is used to associate an opaque variable with a placeholder in an SQL or PL/SQL statement. Unlike older OCI bind calls, this function can be used to bind placeholders that are to be used in piecewise operations or in operations involving arrays.
Input arguments:
- cursor -- Cursor data area descriptor.
- opcode -- Specifies the target of the data binding. The following values are allowed:
- OCI_PIECEWISE -- Operation on one of many pieces.
- OCI_STANDARD -- Operation on a single value.
- OCI_ARRAY -- Operation on an array of values.
- sqlvar -- The name of the SQL placeholder, including the leading colon.
- sqlvl -- The length of the contents of sqlvar or OCI_NTS.
- pvctx -- Context-appropriate data that may be retrieved when the statement is executed or OCI_NULL_ARRAY if not required.
- progvl -- For a piecewise bind, this should be the maximum possible size of the data element. Otherwise, it should be the size, in bytes, of a single element of type ftype.
- ftype -- The external datatype of the program variable. The following values are allowed:
- SQLT_CHR -- (ORANET TYPE) character string
- SQLT_NUM -- (ORANET TYPE) oracle numeric
- SQLT_INT -- (ORANET TYPE) integer
- SQLT_FLT -- (ORANET TYPE) floating point number
- SQLT_STR -- zero terminated string
- SQLT_VNU -- NUM with preceding length byte
- SQLT_PDN -- (ORANET TYPE) packed decimal numeric
- SQLT_LNG -- long
- SQLT_VCS -- variable character string
- SQLT_NON -- null/empty PCC descriptor entry
- SQLT_RID -- rowid
- SQLT_DAT -- date in oracle format
- SQLT_VBI -- binary in VCS format
- SQLT_BIN -- binary data (DTYBIN)
- SQLT_LBI -- long binary
- SQLT_UIN -- unsigned integer
- SQLT_SLS -- display sign leading separate
- SQLT_LVC -- longer longs (char)
- SQLT_LVB -- longer long binary
- SQLT_AFC -- ANSI fixed character
- SQLT_AVC -- ANSI variable character
- SQLT_CUR -- cursor type
- SQLT_LAB -- label type
- SQLT_OSL -- oslabel type
- indp -- An array of indicator variables or OCI_NULL_ARRAY if not required.
- alen -- An array of element length indicators or OCI_NULL_ARRAY if not required.
- arcode -- An array of column-level error return codes or OCI_NULL_ARRAY if not required.
- pv_skip -- Size of a single element in the bound data array or zero for non-array bindings.
- ind_skip --Size of a single element in the bound indicator variable array.
- alen_skip -- Size of a single element in the bound length array.
- rc_skip -- Size of a single element in the column-level error codes array.
- maxsiz -- The maximum size of an array being bound to a PL/SQL table. For scalar and array binds use OCI_MAXSIZ_SCALAR or OCI_MAXSIZ_ARRAY.
Output argument:
- cursiz -- The actual number of elements in the array bound to a PL/SQL table. This parameter is required but ignored for scalar and array binds.
Example:
set RetCode to OCI_obindps
( Cursor,
OCI_PIECEWISE,
":Midi",
OCI_NTS,
OCI_NULL_ARRAY,
40000,
SQLT_LBI,
OCI_NULL_ARRAY,
OCI_NULL_ARRAY,
OCI_NULL_ARRAY,
0,
0,
0,
0,
OCI_NOPLSQL,
DummyCtr
)
Generated: April 21, 1999 at 2:01:12 pm
If you have any comments about this section of the documentation, send email to [email protected]
Copyright © OmniMark Technologies Corporation, 1988-1999.