Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 VB 和 Access,尝试使用 Select 语句过滤 WHERE EmployeeID 等于 userInput 这是一个 int 值,但给我一个错误数据类型不匹配
Set MyRec = MyDB.OpenRecordset("SELECT * From EmployeeTable WHERE EmployeeID ='" & userInput & "' ")
我猜这与您在 WHERE INT VALUES 语句中如何构造查询有关。请帮忙谢谢各位。
取出单引号。
Set MyRec = MyDB.OpenRecordset("SELECT * From EmployeeTable WHERE EmployeeID =" & userInput & "")