Q:

Threaded Sql Query in C#

ive searched for the archive but cant find a suitable entry.  sorry if exists. 
im using vs2008, .NET 3.5, MS-SQL2008 
My Code is simple;
SqlConnection CONN=new SqlConnection(SomeConnectionString);
CONN.Open();

SqlCommand cmd = CONN.CreateCommand();
cmd. CommandText="SELECT FIELD1,FIELD2,FIELD3 from table1";

SqlDataAdapter da = new SqlDataAdapter(cmd);

DataTable dt = new DataTable();
da. Fill(dt);

so DataTable dt is ready to use. 
But i want to make the query stoppable by user, coz it may last too much long to wait.  so user will stop the query, change parameters and requery. 
Also i want to show a stopwatch for query time, during query execution. 
As expected, i cant do those in the same thread of sql query. 
What should be the best and simplest threading approach for above code?  can someone reply a piece of code for that?  note that; DataTable dt must be available for the main thread at the end. 
thanks in advance

A:

Well if you want to do a separate thread and execute the command there you can try this code:
System. Threading. Thread thread = new System. Threading. Thread(new System. Threading. ThreadStart(LoadDB));
thread. Start();
//put this command wherever you want

private void LoadDB()
{
SqlConnection CONN=new SqlConnection(SomeConnectionString);
CONN.Open();

SqlCommand cmd = CONN.CreateCommand();
cmd. CommandText="SELECT FIELD1,FIELD2,FIELD3 from table1";

SqlDataAdapter da = new SqlDataAdapter(cmd);

DataTable dt = new DataTable();
da. Fill(dt);
}

