Help OCI: Sequence Parameter

Help OCI: Sequence Parameter

Post by Axel Fi » Wed, 19 Dec 2001 15:57:34



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(),
(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),
CdbGlobal::errors());

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

 
 
 

1. 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(),
(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),
CdbGlobal::errors());

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

2. Rounding - how to do "Bankers Rounding" in SQL Server 2000

3. Oracle oci driver: Core dump-oci parameter passed

4. 7.3.2 psql error!

5. pls help: OCI 8 parameter descr ?

6. Adding fields in a view

7. OCI oexfet gives error 1002 Fetch out sequence error

8. Deleting 60MB out of 100MB generates 600MB of Archive Redo Logs?

9. Types of parameters in OCI

10. oci stored procedure parameter bind

11. OCI calls in C++Builder - Too Many Parameters

12. calling PL/SQL func with OUT parameter from OCI

13. describe parameter in OCI ?