K
Kory
How do you stop a long running query with a SQLConnection or SQLCommand?
Calling Close on either just waits until the query is done. Is there a way
to stop it?
The following on a long query
SqlConnection mySqlConnection = new
SqlConnection("server=(local)\\NetSDK;Trusted_Connection=yes;database=northw
ind");
mySqlConnection.Open();
SqlCommand mySqlCommand = new SqlCommand("select * from employees order by
EmployeeID", mySqlConnection);
SqlDataReader myReader = mySqlCommand.ExecuteReader();
myReader.Close();
mySqlConnection.Close();
Calling Close on either just waits until the query is done. Is there a way
to stop it?
The following on a long query
SqlConnection mySqlConnection = new
SqlConnection("server=(local)\\NetSDK;Trusted_Connection=yes;database=northw
ind");
mySqlConnection.Open();
SqlCommand mySqlCommand = new SqlCommand("select * from employees order by
EmployeeID", mySqlConnection);
SqlDataReader myReader = mySqlCommand.ExecuteReader();
myReader.Close();
mySqlConnection.Close();