Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: OCI Error Handling (trapping UPDATE errors)
Hi Massis.
The problem lies in the logic. Try this in SQL+:
create table test (col1 number, col2 number);
insert into table test values (100, 100);
commit;
update test set col1 = 100 where col2=200;
You'll see the result:
no rows updated
The statmement itself did NOT fail. It just didn't update anything. I think you should be able to deduce the trick to getting it to do what you want :)
Regards,
Dave Haas
"Massis Isagholian" <massis_at_socal.rr.com> wrote in message
news:aBkD7.36883$xe.9722139_at_typhoon.we.rr.com...
> I have an OCI application that's trying to update a non-existent row. The
> problem is that the OCIStmtExecute() function does not return an error
when
> this happens. I'm using "if (OCIStmtExecute(...))" for error detection.
Is
> this not the right way to detect this type of errors?
>
> Thanks
> Massis
>
>
>
>
Received on Mon Oct 29 2001 - 21:12:00 CST
![]() |
![]() |