|
-
Jul 28th, 2009, 11:22 PM
#1
Thread Starter
Member
Search record using like operator
I have developed an application in VB2008/MySql as MySQl connector.I did serach record method but i need serach record using wild charcters i.e. like operator(S%,%S).Have a look at the normal search record code .
For Each de In myHT
If de.Value.ToString() <> "" Then
If iCount = 1 Then
searchquery = "select date,PartNo,Customer,Requestor,Quotes,SO,WO,Vendor,Quantity,Turn,price,Lot,layers,x,y,Thick,Material ,MinLine,Minspace,MinDrill,ViaFill,impedence,plating,PacDesign,comments from quotes where"
searchquery = searchquery + " " + de.Key + "=" + "'" + de.Value.ToString() + "'"
iCount = iCount + 1
Else
searchquery = searchquery + " " + "And" + " " + de.Key + "=" + "'" + de.Value.ToString() + "'"
End If
End If
Next
-
Jul 28th, 2009, 11:40 PM
#2
Re: Search record using like operator
I think you should have something like this:
Code:
SELECT * FROM [YourTable] WHERE [YourColumn] LIKE '%" & searchStr & "%'
-
Jul 28th, 2009, 11:53 PM
#3
Thread Starter
Member
Re: Search record using like operator
Yes i am looking like but it should be added to above stated code
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
|