我知道我应该像这样在 RowFilter 的字符串之间加上单引号
dim TOS as string="04"
rowFilter.RowFilter = "(TOScode= " & "'" & TOS & "')"
我只是想知道为什么下面的代码在没有单引号的情况下仍然有效。
rowFilter.RowFilter = "(TOScode = " & TOS & ") "
TOScode 字段是 SQL 中的 varchar(2) 类型。英语不是我的母语;请原谅打字错误。