0

我正在使用 Visual Basic Express 2010 并且正在使用 Access 数据库

Dim count as Integer

SQL = "SELECT * FROM transac WHERE transac_id = " & "'" & count & "'"

4

2 回答 2

4

我会假设您transac_id是一种INT数据类型,并且您将单引号放在count使其成为字符串的周围。

尝试:

SQL = "SELECT * FROM transac WHERE transac_id = " & count
于 2013-01-03T17:41:37.100 回答
2
"select * from transac where transac_id = " & count;
于 2013-01-03T17:41:33.063 回答