neu
This commit is contained in:
@@ -262,13 +262,22 @@ Public Class MySearchBox
|
||||
Dim SQLstr As String = "SELECT TOP " & topAnz & " " & SQL_SELECT & " WHERE 1=1 "
|
||||
SQLstr &= If(SQL_WHERE <> "", " AND " & SQL_WHERE, "")
|
||||
|
||||
If SQL_WhereParamList.Count > 0 Then
|
||||
If srch <> "" And SQL_WhereParamList.Count > 0 Then 'erster Suchparameter
|
||||
SQLstr &= " AND ( 1<>1 "
|
||||
For Each s In SQL_WhereParamList
|
||||
SQLstr &= " OR " & s & " LIKE '" & srch & "%' "
|
||||
Next
|
||||
SQLstr &= " ) "
|
||||
End If
|
||||
|
||||
If srch2 <> "" And SQL_WhereParamList.Count > 0 Then 'Wenn zweiter Suchparameter
|
||||
SQLstr &= " AND ( 1<>1 "
|
||||
For Each s In SQL_WhereParamList
|
||||
SQLstr &= " OR " & s & " LIKE '" & srch2 & "%' "
|
||||
Next
|
||||
SQLstr &= " ) "
|
||||
End If
|
||||
|
||||
If SQL_ORDER_BY <> "" Then SQLstr &= " ORDER BY " & SQL_ORDER_BY
|
||||
'MsgBox(SQLstr)
|
||||
' MsgBox(SQL.loadDgvBySql(SQLstr, conn_art).Rows.Count)
|
||||
|
||||
Reference in New Issue
Block a user