Newbie Question...Debugging

  • Thread starter Thread starter Jeff Burgoon
  • Start date Start date
J

Jeff Burgoon

Every time I run any type of SQL statement, be it a query or command, if the
SQL statement has an error for any reason I get a very generic error from
the compiler such as

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll

Additional information: System error.

Is there any way I can get the compiler to give me a more specific error, ie
the error directly from the SQL server?

Thanks,
Jeff
 
try

{

cmd.ExecuteNonQuery();

}

catch (Exception e)

{

MessageBox.Show(e.Message);

}
 
Back
Top