-- 写了一段查找的代码,但是提示不对
以下是我写的代码:
Dim filter As String
Dim sts() As String = {"客户","订单编号"}
For Each st As String In sts
Dim var As String = e.Form.Controls(st).value
If var IsNot Nothing Then
var = var.replace("*","[*]")
If filter Is Nothing Then
filter = st & " like \'*" & var & "*\'"
Else
filter = filter & " and " & st & " like \'*" & var & "*\'"
End If
End If
Next
和之前一个模块写的代码一模一样,但是没办法正确出结果,请指教。