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);

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

c# samples 15
Cannot see SQL Server instance 2
SqlCommand 3
Help connnecting to sql server 2
Error Message.. help. 1
Update database from dataset 6
Profile Object Issue 1
MySQL and C# 1

Back
Top