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

Home -> Community -> Usenet -> c.d.o.misc -> Re: ADO error handling

Re: ADO error handling

From: Jimbo <invalid_at_invalid.spam>
Date: Thu, 05 Dec 2002 16:41:58 +0000
Message-ID: <bkvuuug5ipnvr82q24isedc9nc2d7s0a44@4ax.com>


tojo wrote:
>In article ... says...
>>
>> Can anyone tell me why error handlers not catcthing oracle unique
>> contraint errors?

[ snips ]

>A unique contraint error is provider-specific, not an ADO error. That
>means it won't cause a VB runtime error, and your ErrorHandler label
>will never be reached. You should either:
>
>1. Check your dbConnection.Errors collection right after you Execute

How do I access the error when its's actually breaking on the dbCommand.Execute. I tried this below but no joy, will it fire some event i'm unaware of?

dbCommand.Execute
MsgBox dbConnection.Errors.Item.Number

I actually want the insert to fail if it causes duplicates, but I don't want my program to fall over.

>2. Use the RecordsAffected parameter with Execute to make sure your
>insert succeeded.

Ok, never used that, sounds handy. Received on Thu Dec 05 2002 - 10:41:58 CST

Original text of this message

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