vb.net - Catching ODP.NET exception using error codes -
I am working on an application which is SqlBulkCopy and OracleBulkCopy uses it. Occasionally when I try to insert some records and already add the records on SQL Server, it throws an exception that I hold down as straightforward, and I handle it in some way.
Hold as SqlException Ex.ErrorCode = -2146232060 However, I'm not sure how the exception can hold on OracleBulkCopy Comes with: ORA-26026 .
This is the structure that I am attempting to use:
Try to grab code like SQLXSample when ex.ErrorCode = -2146232060 'handles SQL Catch Before the Oracle Execution as before when Number = 26026 = Headl Oracle catches out X expansion 'handle normal errors end android Is there any way?
A OracleException (Microsoft implementation) has a property that you 26026 :
You can use it to match (ex.Code == 26026) {...}
if (ex.Number == 26026) {...}
Comments
Post a Comment