Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: OCI Error Handling (trapping UPDATE errors)

Re: OCI Error Handling (trapping UPDATE errors)

From: Dave Haas <davehaas_at_--nospam--hotmail.com>
Date: Tue, 30 Oct 2001 03:12:00 GMT
Message-ID: <4UoD7.60530$Og4.8636124@news0.telusplanet.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US