You need to put the database code in a block try ... catchand (assuming you are using ADO.NET for SQL Server), then drag and drop SqlException.
try
{
}
catch(SqlException sqlEx)
{
foreach(SqlError error in sqlEx.Errors)
{
}
}
SqlException SqlError, , - , .
- !