Re: Wildcard "%" not working
From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 05/22/04
- Next message: Herfried K. Wagner [MVP]: "Re: omg plzzzz help impossible conversion vb--->vb.net"
- Previous message: Herfried K. Wagner [MVP]: "Re: Read webpage with VB app"
- In reply to: MB: "Wildcard "%" not working"
- Messages sorted by: [ date ] [ thread ]
Date: 22 May 2004 13:47:28 +0200
* maha_ice@yahoo.com (MB) scripsit:
> I am using a datagrid and the datagrid is filled through the SQL
> query. The SQL query searches for the match in the database. The SQL
> Query that i am writing is as follows
>
> Dim selprod As String = "SELECT ProductID, ProductName FROM Products
> WHERE ProductName LIKE '%prod%'"
>
> but it is not working.
> If I use the query this way(as given below) it works but I want to use
> wildcard so that it searches thoroughly and provide with me with all
> the records
>
> Dim selprod As String = "SELECT ProductID, ProductName FROM Products
> WHERE ProductName LIKE '" + prod + "'"
>
> If i use LIKE '" +%prod%+ "'" or something sort of like this it doesnt
> work either... any idea how it will work.
Your question is 0 percent related to VB.NET. Please post to the
appropriate group in future:
<URL:news://news.microsoft.com/microsoft.public.dotnet.framework.adonet>
Web interface:
<URL:http://msdn.microsoft.com/newsgroups/?dg=microsoft.public.dotnet.framework.adonet>
Thank you for your cooperation!
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
- Next message: Herfried K. Wagner [MVP]: "Re: omg plzzzz help impossible conversion vb--->vb.net"
- Previous message: Herfried K. Wagner [MVP]: "Re: Read webpage with VB app"
- In reply to: MB: "Wildcard "%" not working"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|