string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=users.mdb";
OleDbConnection conn = new OleDbConnection(strConnection);
string sql = string.Format("select count(*) from [user] where 用户名='{0}' and 密码='{1}'", textBox1.Text.Trim(), textBox2.Text.Trim());//问题出现在密码那里的字段类型我设置为数字,只要去掉 and 密码='{1}'和, textBox2.Text.Trim(),就可以正确执行!!否则提示 标准表达式中数据类型不匹配
OleDbConnection conn = new OleDbConnection(strConnection);
string sql = string.Format("select count(*) from [user] where 用户名='{0}' and 密码='{1}'", textBox1.Text.Trim(), textBox2.Text.Trim());//问题出现在密码那里的字段类型我设置为数字,只要去掉 and 密码='{1}'和, textBox2.Text.Trim(),就可以正确执行!!否则提示 标准表达式中数据类型不匹配
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货