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

php - How to pass multiple values from url -

database - php search bar when I press submit with nothing in the search bar it shows all the data -

ios - How to load .png images from Documents folder of an app -