datagrilview赋值问题!
private void button3_Click(object sender, EventArgs e){
string connString = "Data Source=.\\SQLSERVER;Initial Catalog=Record;User ID=sa;pwd=123;";
SqlConnection conn = new SqlConnection(connString);
string sql = "select * from operation where name = '" + label5.Text.Trim() + "'";
conn.Open();
}
我才学C# 很多不懂,我上面是查询按钮的,我读出的数据想赋值给表格 dataGridView1 不知道怎么写,请各位帮忙指教下!
[ 本帖最后由 lovellq39 于 2011-2-18 11:17 编辑 ]