Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI8.0 : ...OCIDescribeAny function call
why are you using the strlen?
if you are using it to describe an objptr then you do not need to pass
it the length of name.
if it is a name then I think you objptr must be valid, and it would make sense to for you to do this.
//objptr must be a vlid ptr. aloocate memory.
strcpy(objptr,"month");
OCIDescribeAny(svchp, errhp, (text *)objptr,
(ub4) strlen(objptr), OCI_OTYPE_NAME, (ub1)1, OCI_PTYPE_TABLE, dschp);>
>OCIHandleAlloc((dvoid *) envhp, (void **) &dschp,
> (ub4) OCI_HTYPE_DESCRIBE,
> (size_t) 0, (dvoid **) 0));
On Wed, 08 Dec 1999 07:09:13 GMT, Parvinder Singh <parora_at_questone.com> wrote:
>hello all
>i m once again here to trouble you guys...hope someone amongst you who
>has worked on OCI can help me ...
>
>here is the piece of code which i m trying to execute
>
>
>/*allocating the handle for OCIDescribe*/
>OCIHandleAlloc((dvoid *) envhp, (void **) &dschp,
> (ub4) OCI_HTYPE_DESCRIBE,
> (size_t) 0, (dvoid **) 0));
>
> /* Get number of fields*/
> OCIDescribeAny(svchp, errhp, (text *)objptr,
> (ub4) strlen((char*)"month_f"), OCI_OTYPE_NAME,
>(ub1)1,
> OCI_PTYPE_TABLE, dschp);
>
>
>
>now the OCIHandleAlloc gets executed properly without any error i have
>checked the return status too but when OCIDescribeAny is executed it
>gives an runtime error related to memory allocation....stating "Acces
>Violation"...
>
>From last 2 days i have been struggling .....
>
>Regards & Thanks in advance
>Parvinder
>
>
Received on Mon Dec 13 1999 - 17:13:35 CST
![]() |
![]() |