If I try and call a stored procedure and there is a database error, will that raise as an exception in my C# code? Or do I need to check the result of the stored procedure and raise an exception myself?
Eg:
using (SqlCommand cmd = new SqlCommand("prc_InsertSomething", conn))
{
if (cmd.ExecuteNonQuery() != 1) // should I be doing this bit or not?
{
throw new DataException("Could not insert something");
}
}
Thanks