vb.net - Catching ODP.NET exception using error codes -



vb.net - Catching ODP.NET exception using error codes -

i working on application uses sqlbulkcopy , oraclebulkcopy. when seek insert records , records exist on sql server, throws exception grab below, , handle in way.

grab ex sqlexception when ex.errorcode = -2146232060

however, not sure how grab exception on oraclebulkcopy comes error code: ora-26026.

this construction i'm trying use:

seek 'code grab ex sqlexception when ex.errorcode = -2146232060 'handle sql grab ex oracleexception when ex.number = 26026 'handle oracle grab ex exception 'handle general errors end seek

is there way?

an oracleexception (microsoft implementation) has code property. can utilize match 26026:

if (ex.code == 26026) { ... }

the oracle implementation of oracleexception has number property:

if (ex.number == 26026) { ... }

vb.net oracle

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -