我尝试使用两个 where 子句从访问数据库中获取值。这是我得到的错误!
"Syntax error (missing operator) in query expression 'unit1<=34 and unit2>=34 where"'
.
这是我的代码:
OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\\Work\\Office\\Electricity_Board_bill_calculator\\gk.accdb;");
con.Open();
OleDbCommand com5 = new OleDbCommand("select id from tblBillConfig where unit1<="
+ contot + " and unit2>=" + contot + " where group=3 ", con);