I'm trying to use Like, but don't know how to do it. This is my code:
searchAdapter = New OleDb.OleDbDataAdapter("Select * From ClientSystem WHERE Company_Name LIKE *@search*", connStr)
searchAdapter.SelectCommand.Parameters.AddWithValue("@search", txtSearch.Text)
May I ask also if this is possible, im creating a search button, need to check if the entered keyword is the Company_Name or Contact_Last_Name..
searchAdapter = New OleDb.OleDbDataAdapter("Select * From ClientSystem WHERE Company_Name OR Contact_Last_Name LIKE *@search*", connStr)
searchAdapter.SelectCommand.Parameters.AddWithValue("@search", txtSearch.Text)
Kindly help me to correct this problem.


Reply With Quote
