I wanna help on the following aspect of SQL data retrieval which requires one to retrieve data from remote SQL server site asynchronously.
Im building a c# application. I want to retrieve record (network packets info) from the remote computer that is located on the same subnet as the client (from which it receives the request). Since due to the large volume of data which may include more than 20,000 rows in each table .....
Is simply too slow for comfort and more importantly this function halts the execution of more user controlled events like clicking other buttons and moving cursor. The whole control on the panel is lost during the sql command execution and its bloody annoying .
So does anyone know how could i make fun() behave asynchronously.
thxs.....
Im building a c# application. I want to retrieve record (network packets info) from the remote computer that is located on the same subnet as the client (from which it receives the request). Since due to the large volume of data which may include more than 20,000 rows in each table .....
Code:
void results() { dataGridView1.DataSource = null; DataSet ds = new DataSet(); SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM " + state, rc); // where rc is the SQL connection point that exists b/w my sql client and SQL server (remote machine) meaning the connection is already established when i execute the command adapter.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; }
Is simply too slow for comfort and more importantly this function halts the execution of more user controlled events like clicking other buttons and moving cursor. The whole control on the panel is lost during the sql command execution and its bloody annoying .
So does anyone know how could i make fun() behave asynchronously.
thxs.....
Comment