[求助]查询问题
如何实现按查询字符串的汉语拼音来查找。请高手指点
String sql="";// 里面加你oleDbConnection1的路径
String source ="select * from 学生表 where 学号 ='"this.xuehao.Text"'";//以链接db1DataSet1的学生表为例子
OleDbConnection oleDbconnection1 = new OleDbConnection (sql);
OleDbDataAdapter oleDbDataAdapter1=new OleDbDataAdapter(source,oleDbconnection1);
DataSet db1DataSet1 = new DataSet();
oleDbDataAdapter1.Fill(db1DataSet1,"学生表");
oleDbDataAdapter1.Update(db1DataSet1,"学生表");
if(db1DataSet1.Tables["学生表].Rows.count!=0)
{
this.dataGrid1.dataSource = db1DataSet1.Tables["学生表"];
}
else
{
MessageBox.Show("您的输入有错误");
}
我刚刚做了一个管理系统,刚刚好可以告诉你这样代码,呵呵