C#标准表达式中数据类型不匹配。
stringaccess1="selectname1frommyaccesswhereadmID='"+sto.Text+"'andpasswd='"+password....
string access1 = "select name1 from myaccess where admID = '" + sto.Text + "' and passwd = '" + password.Text + "' and leibie = '"+ this.cBox1.Text +" '";
conn.Open();
OleDbCommand sc = new OleDbCommand(access1, conn);
string count = Convert.ToString(sc.ExecuteNonQuery());//标准表达式中数据类型不匹配。
MessageBox.Show(count.ToString());
conn.Close();
if (count != null )
{
MessageBox.Show("登录成功!");
//Form3 fr = new Form3();
//fr.ShowDialog();
}
else
{
MessageBox.Show("用户名或密码错误!");
sto.Text = "";
password.Text = "";
} 展开
conn.Open();
OleDbCommand sc = new OleDbCommand(access1, conn);
string count = Convert.ToString(sc.ExecuteNonQuery());//标准表达式中数据类型不匹配。
MessageBox.Show(count.ToString());
conn.Close();
if (count != null )
{
MessageBox.Show("登录成功!");
//Form3 fr = new Form3();
//fr.ShowDialog();
}
else
{
MessageBox.Show("用户名或密码错误!");
sto.Text = "";
password.Text = "";
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询