为什么在DATAset 中出现数据类型错误??
objConnection.Open();string sql = "select StudentInfo.StudentId as 自动编号,studentinfo.studentnumber as 学号,studentinfo.name as 姓名,studentinfo.sex as 性别,studentinfo.race as 族别,studentinfo.address as 家庭住址,studentinfo.telephone as 联系方式,studentinfo.role as 政治面貌,studentinfo.postalcode as 邮政编码,classinfo.classname as 班级名称,studentinfo.remark as 备注 from classinfo,studentinfo where classinfo.classid=studentinfo.classid and classinfo.classname='" + comboBox2.SelectedItem.ToString().Trim() + "'";
OleDbDataAdapter adp = new OleDbDataAdapter(sql, objConnection);
DataSet das = new DataSet();
das.Clear();
adp.Fill(das, "class");
dataGridView1.DataSource = das.Tables[0].DefaultView;
objConnection.Close();