我正在使用Visual Basic Express 2010并且正在使用Access数据库
Dim count as Integer
SQL = "SELECT * FROM transac WHERE transac_id = " & "'" & count & "'"
答案 0 :(得分:4)
我认为您的transac_id
是INT
数据类型,并且您在count
周围放置单引号,使其成为字符串。
尝试:
SQL = "SELECT * FROM transac WHERE transac_id = " & count
答案 1 :(得分:2)
"select * from transac where transac_id = " & count;