vb进行access模糊查询的like用法(在线等 急)
rs.Open "SELECT * FROM 表1 where ns like '* '& Text2.Text & '* ' ",conn, rs.CursorType, rs.LockType
这样不行?改了好几遍 都不对
[解决办法]
"SELECT * FROM 表1 where ns like '* " & Text2.Text & "* ' "
[解决办法]
若字段是字符类型的,则like 后边的值要用单引号
[解决办法]
ACCESS和SQL Server不一样,模糊查找时一个用% 一个用*
[解决办法]
rs.Open "SELECT * FROM 表1 where ns like '* " & Text2.Text & "* ' ",conn, rs.CursorType, rs.LockType
[解决办法]
rs.Open "SELECT * FROM 表1 where ns like " & " " " " & "* " & Text2.Text & "* " & " " " "