G
Guest
I have the following code to open a database. Since I don't have the db as
specified in the connectionString, the connection.Open() will throw an
SqlException. My question is why it opens the "SqlException occured" dialog
before it goes to the catch block? Is there a setting to turn the dialog off?
I am expecting to catch and handle the exception myself. I am in debug mode.
try
{
SqlConnection connection = new SqlConnection(connectionString);
connection.Open();
}
catch (Exception e)
{
}
specified in the connectionString, the connection.Open() will throw an
SqlException. My question is why it opens the "SqlException occured" dialog
before it goes to the catch block? Is there a setting to turn the dialog off?
I am expecting to catch and handle the exception myself. I am in debug mode.
try
{
SqlConnection connection = new SqlConnection(connectionString);
connection.Open();
}
catch (Exception e)
{
}