Property that contains actual error message returned by SQL Server - ADO.NET

Q.  What property contains the actual error message returned by SQL Server?

1. SqlException.Source
2. SqlException.Message
3. SqlError.Class
4. SqlError.Message

- Published on 19 Oct 15

a. 1, 2
b. 1, 2, 3
c. 1, 3
d. 2, 4

ANSWER: 2, 4
 
SqlException.Message and SqlError.Messageproperty contains the actual error message returned by SQL Server.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)