Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> pls help: OCI 8 parameter descr ?
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**)¶mdp, 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