你的Userid和psd1都是用textBox控件吗? 如果是的话试试这样: "select Userid,Psd1,from userinfo where userid = '"+this.userid.Text+"' and psd1 = '"+this.psd1.Text+"'";
"select * from userinfo where userid like '%"+this.userid.Value+"%' and psd1 = '%"+this.psd1.Value+"%'";错.第二行.用到%就肯定要用like 不能用= "select count(*) from userinfo where userid = '"+this.userid.Value+"' and psd1 = '"+this.psd1.Value+"'";去掉%的原因:%代表多个字符.
如果是的话试试这样:
"select Userid,Psd1,from userinfo where userid = '"+this.userid.Text+"' and
psd1 = '"+this.psd1.Text+"'";
psd1 = '%"+this.psd1.Value+"%'";错.第二行.用到%就肯定要用like 不能用=
"select count(*) from userinfo where userid = '"+this.userid.Value+"' and
psd1 = '"+this.psd1.Value+"'";去掉%的原因:%代表多个字符.