Using parameters with LIKE comparison

  • Thread starter Thread starter Mindaugas
  • Start date Start date
M

Mindaugas

Hello

I have trayed to create SQLCommand with sql query:
SELECT * FROM
WHERE [field] LIKE @Param

If I'm using symbols '%' in @Param value it doesn't gives
any results. However sybols '_' are working fine.

How I can make this query work with symbols '%' ?
 
Let's see your code--how do you setup the parameter?
What (exactly) are you passing to the Parameter.Value at runtime?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top