所以这是我的功能..它工作得很好,除了它过滤每个包含数字 3 的单元格,如 300 313 30 43 但我希望它只过滤只有单个数字 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
另一件事是选择语句用于过滤2个指定数字之间的值,比如4到16之间谢谢