Я пытаюсь поиска в текстовое поле элемента управления datagridview
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBar.TextChanged ' Try Dim sql As String = "Select Barcode,ItemName,ItemDescription,Quantity,Price from Items" cnn.ConnectionString = "Provider=Microsoft.ACE.Oledb.12.0; Data Source=" & Application.StartupPath & "\InventSystem.accdb" cnn.Open() Dim dataadapter As New OleDbDataAdapter(sql, cnn) Dim ds As New DataSet() Dim dsView As New DataView Dim bs As New BindingSource() dataadapter.Fill(ds, "Items") cnn.Close() dsView = ds.Tables(0).DefaultView bs.DataSource = dsView bs.Filter = "Barcode LIKE '" & txtBar.Text & "*' or ItemName LIKE '" & txtBar.Text & "*' or ItemDescription '" & txtBar.Text & "*' or Quantity '" & txtBar.Text & "*'or Price '" & txtBar.Text & "*';" Me.DataGridView1.DataSource = bs cnn.Close() 'Catch ex As Exception 'MsgBox(ex.ToString, MsgBoxStyle.Critical) ' End Try End Sub
Что я уже пробовал:
я получаю сообщение об ошибке
Syntax error: Missing operand after ''2*'' operator.