How to change SQL select on Datagrid

  • Thread starter Thread starter cgchris99
  • Start date Start date
C

cgchris99

Guest
I have a data grid displaying the contents of a table.
But when they enter data in a field and pick the filter button I want it to
do the following.

Mystring = "select Recipe.CustomerName, Recipe.CustomerPartNumber,
Recipe.Description from Recipe where CustomerName like *" &
txtCriteria.Text & "*"

How do I apply this new select statement and then get it to refresh


I tried this and it causes an exception
OleDbDataAdapter2.SelectCommand.CommandText = Mystring

Thanks for any advice
 
Back
Top