|
-
Apr 14th, 2010, 02:07 AM
#1
Thread Starter
Lively Member
Query Problem
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|