Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: using OCIRowidToChar
Hi Harald
thanks for the reply, I don't see any error until I run the OCIRowidToChar function. I am single stepping in the debugger, so I am confident the error occurs with the OCIRowidToChar function.
When I check OCI_ATTR_ROWS_FETCHED right after the OCIStmtExecute, the result I get back is 1. This is expected since I would like to update 1 row.
Is there any way to tell if the row ID I am getting back is valid?
thanks
Naveed
Harald Maier <maierh_at_myself.com> wrote in message news:<m3n0e4yyej.fsf_at_ate.maierh>...
> deevandeevan_at_hotmail.com (yy343) writes:
>
> > Hi
> >
> > I am trying to use OCIRowidToChar with a select for update statement.
> >
...
> > The problem is that the call to OCIRowidToChar returns the following
> > error:
> > "ORA-01405: fetched column value is NULL"
> >
> > How can I work around this problem? If I run the query manually (in
> > sqlplus without the for update) then I get 1 row back, so why is the
> > rowid null?
>
> Is it possible that the error happens _before_ OCIRowidToChar? The
> error 01405 normally happens if a 'fetch into' contains a null value.
> Look for the fetched columns if one of them contains null values.
> Personally, I like in this situation the function _nvl_.
>
> Harald
Received on Wed Aug 20 2003 - 18:54:00 CDT