levyuk
Well-known member
Hi
I have this code
What I would like to do is change the LIKE part so that the variable to search by is equal to some text from a textbox e.g.
cmdSelect = New OleDbCommand( "SELECT [recipes].[ID], [recipes].[Name] FROM [recipes] WHERE Name LIKE '" & TextBoxName.Text "%'", conNorthwind )
Does anyone know how to do this?
I have this code
VB.NET:
cmdSelect = New OleDbCommand( "SELECT [recipes].[ID], [recipes].[Name] FROM [recipes] WHERE Name LIKE 'a%'", conNorthwind )
What I would like to do is change the LIKE part so that the variable to search by is equal to some text from a textbox e.g.
cmdSelect = New OleDbCommand( "SELECT [recipes].[ID], [recipes].[Name] FROM [recipes] WHERE Name LIKE '" & TextBoxName.Text "%'", conNorthwind )
Does anyone know how to do this?