Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help OCI: Sequence Parameter
Hi,
I have a problem to get the sequence parameter. The description in the help
(and the parameter
types) seems very mystic to me. I have found only one example code but it
doesn't work
correctly.
Here are the statements I use:
OCIDescribe *pdesc = NULL; OCIParam *pHandle= NULL; ub1 cache; // wy these vars are defined as ub1 ??? ub1 incr,ord; oci_CALLFN(OCIHandleAlloc(environment(), (void**)&pdesc, OCI_HTYPE_DESCRIBE, 0, NULL), dbc.errors()); oci_CALLFN(OCIDescribeAny(dbc.getContext(), dbc.errOCI(),CdbGlobal::errors());
(text*)name.c_str(),
name.size(), OCI_OTYPE_NAME, (ub1)OCI_DEFAULT,
(ub1)OCI_PTYPE_SEQ, pdesc), dbc.errors());
oci_CALLFN(OCIAttrGet(pdesc, OCI_HTYPE_DESCRIBE, (void*)&pHandle, 0, OCI_ATTR_PARAM, dbc.errOCI()), dbc.errors()); oci_CALLFN(OCIAttrGet(pHandle, OCI_DTYPE_PARAM, (ub1*)&incr, 0, OCI_ATTR_INCR, dbc.errOCI()), dbc.errors()); oci_CALLFN(OCIAttrGet(pHandle, OCI_DTYPE_PARAM, (ub1*)&cache, 0, OCI_ATTR_CACHE, dbc.errOCI()), dbc.errors()); oci_CALLFN(OCIAttrGet(pHandle, OCI_DTYPE_PARAM, (void*)&ord, 0, OCI_ATTR_ORDER, dbc.errOCI()), dbc.errors()); // and free the handle oci_CALLFN(OCIHandleFree(pdesc, OCI_HTYPE_DESCRIBE),
The 'ord'-value is correct. But the Cache- and Increment-values are not correct. The value I get for these vars is also the same if I change the sequence parameter. Can anybody tell me what I get.?
Thank you in advance,
Axel
Received on Tue Dec 18 2001 - 00:57:34 CST