Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> pls help: OCI 8 parameter descr ?

pls help: OCI 8 parameter descr ?

From: Oliver.Allgaier <Oliver.Allgaier_at_sidoc.de>
Date: Fri, 20 Nov 1998 11:30:05 +0100
Message-ID: <365544AD.434617CF@sidoc.de>


Hi,
I am trying to get the column description of a result from a select statement using
OCI 8. I need information like: name, type, is null allowed , precision ....

I am a total newbie and got so far:

The statement has been executed with fetch = 0 rows now I need the information for binding.

ret=OCIAttrGet((dvoid*) hstmt, (ub4)OCI_HTYPE_STMT, (dvoid*) &ncols,

       (ub4*) 0,(ub4)OCI_ATTR_PARAM_COUNT, errhp);

works fine then :

for (i = 1;i <= ncols;i++)
 {

          ret =
OCIParamGet(hstmt,OCI_HTYPE_STMT,errhp,(dvoid**)&paramdp, i );

so I got a param description pointer but what now ???? I tried:

ret = OCIAttrGet(paramdp, OCI_DTYPE_PARAM, (dvoid*)buffer,&ul, OCI_ATTR_NAME , errhp);

ret is OCI_SUCCES but buffer wich is a char* contains only strange characters

is there any sample code for that ?
I think the oci samples in my dir are not up to date

Thanks,
Oliver Received on Fri Nov 20 1998 - 04:30:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US