对了
string strCmd="select count(*) from user where (username like '"+TextBox1.Text"' and pwd like '"+TextBox2.Text+"')";应该是用like 还是==啊??
string strCmd="select count(*) from user where (username like '"+TextBox1.Text"' and pwd like '"+TextBox2.Text+"')";应该是用like 还是==啊??
加上[]
都可以吧
='"+TextBox1.Text"' and pwd = '"+TextBox2.Text+"')";
完整的string strCmd="select count(*) from [user] where username = '"+TextBox1.Text"' and pwd = '"+TextBox2.Text+"'";