根据用户名,密码,在登陆验证中,在数据绑定中写了下面的代码,然后下面不知道如何写啦,请大家帮忙补充完整!谢谢!
void Databind()
{
string strConn="Provider=Microsoft.Jet.OleDb.4.0;";
strConn+=@"Data Source=d:\LGY.mdb";//access数据库连接
sqlconnection myconn=new sqlconnection(strConn); string strSql="select * from lgyqd where username=name and password=pass"; 请帮忙写完!谢谢!
void Databind()
{
string strConn="Provider=Microsoft.Jet.OleDb.4.0;";
strConn+=@"Data Source=d:\LGY.mdb";//access数据库连接
sqlconnection myconn=new sqlconnection(strConn); string strSql="select * from lgyqd where username=name and password=pass"; 请帮忙写完!谢谢!
读出了数据库中关于用户名及密码的信息,然后就把用户输入的用户名和你得到的进行比较就可以了.