What are the sql exceptions will thrown by using the following function:
- Read
- Update
- Write
What are the sql exceptions will thrown by using the following function:
The SqlException
class exposes an Errors
property which is an SqlErrorCollection
containing instances of the SqlError
class. Each SqlError
instance represents a particular Error message that was returned from SQL server.
By the same token, the OleDbException
class enables you to get at each OleDbError
returned from the OleDb datasource.
So, in other words, you will not see different CLI exceptions being raised for each kind of SQL operation - you will only receive an SqlException
. The onus is on you to examine the errors therein.