This commit is contained in:
2021-03-23 11:19:27 +01:00
parent b4612ab3e0
commit e625acc609
22 changed files with 2028 additions and 1763 deletions

View File

@@ -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)