Código vb:
Ver originalSub TextBox1TextChanged(sender As Object, e As EventArgs)
'Primero esto es un string , no un dataset
dim sql as String=("SELECT * FROM PRODUCTS WHERE ProductName like ' % " + TextBox1.Text.Trim + " % ' ")
'no puedes asignar un string a un dataset
'DataGridview1.DataSource =sql
dim ds as new dataset
Dim cnn2 As OleDbConnection=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\Documents and Settings\taluc\Desktop\base de datos\Northwind.mdb; User Id=admin;Password=;")
Dim adap As OleDbDataAdapter= New OleDbDataAdapter(sql, cnn2)
adap.fill(ds)
Me.DataGridView1.DataSource = ds
End Sub