这是我的代码我想在datagridview.Plz中填充数据集和数据时加载进度条帮助我
private void btnLoad_Click(object sender,EventArgs e) {
string str="select Cert_ID,Card_Number,Name,DOB,Mobile,Gender,Relation ";
str = str + " from dbo.beneficiary";
SqlConnection conn = null;
SqlDataAdapter sqlda = null;
DataSet res = new DataSet();
DataTable dt = new DataTable();
try
{
_connectionString = "xyz.........";
conn = new SqlConnection(_connectionString);
conn.Open();
SqlCommand command = new SqlCommand(str, conn);
sqlda = new SqlDataAdapter(command);
sqlda.Fill(res);
dataGridView1.DataSource=res.Tables[0];
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
conn.Close();
}
}