Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What's wrong ? OCI-8 programming
Eric DANTIE wrote in message <367FAE41.44810333_at_rcanaria.es>...
>When I try to get execute this function, I've got a
>ORA-01405: fetched column value is NULL
>
>And that's true: I have some null datas in the table.
>
>I just want to print "NULL" when its NULL and continue, with the others
>fields.
>
> for (i=1;i<=nbcol;i++) {
> checkerr(errhp, OCIDefineByPos(stmthp, &defnp, errhp, i, (dvoid *)
>&binds[i],
> 255, SQLT_STR, (dvoid *) 0, (ub2 *)0,
> (ub2 *)0, OCI_DEFAULT));
Hello,
you should use and indicator variable. It is parameter #8 in OCIDefineByPos.
If you are usíng C++ and want to test my OCI C++ wrapper, please mail.
Dirk Received on Tue Dec 22 1998 - 14:02:50 CST