我只想显示datagridview
. 这是我的查询,但它没有返回任何内容:
sc.Open();
cmd.CommandText = "select * from myEmployees where JobRole ='Waiter'";
dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
dgNames.DataSource = dr["firstName"];
count++
}
}
sc.Close();