How do I handle exception from OLEDB provider?
To handle a vb.net exception, I can use
However, all errors from an OLEDB provider lead to only one exception OleDb.OleDbException.
How do I differentiate different errors from OLEDB provider? Right now I am using the message property of the exception. Not sure I am doing it right because the message text may change even from the same type of error. Can I identify the error with an error number?
Seaport
To handle a vb.net exception, I can use
Code:
Catch e As DivideByZeroException
However, all errors from an OLEDB provider lead to only one exception OleDb.OleDbException.
How do I differentiate different errors from OLEDB provider? Right now I am using the message property of the exception. Not sure I am doing it right because the message text may change even from the same type of error. Can I identify the error with an error number?
Seaport