so here is my function..it works perfect except it filters every cell the contain the number 3 like 300 313 30 43 but i want it to filter only cell values that have only the single digit 3!!
Private Sub LinkLabel4_Click(sender As Object, e As System.EventArgs) Handles LinkLabel4.Click
Dim search As String
search = "SELECT * FROM products WHERE rank LIKE '%" & 3 & "%'"
Dim connectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=E:\db.mdb"
Dim adapter As New OleDbDataAdapter(search, connectionString)
Dim dt As New DataTable("products")
adapter.Fill(dt)
DataGridView1.DataSource = dt
End Sub
another things is the what would be the select statements for filtering with values between 2 specified numbers, like between 4 and 16
Thanks
If
rankis a numeric datatype then your query should be as thisand in the second case
To render your search parametrized you could write a method like this