
private void button1_Click(object sender, EventArgs e)
{
DBConnect();
oledbCon.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select textBox1 as 学号 from 学生基本信息 where textBox1 = '" + textBox1.Text + "'", oledbCon);
DataSet ds = new DataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
oledbCon.Close();
}
老师,这个查询代码哪里错了呀,搜索功能要把表里的所有数据名称都输进去吗