I can execute the following in SQL Query Analyzer:
Select productID, productName from Products where productName LIKE '%Spider%'
and get the results I was expecting.
I must be using the wrong syntax when I try to use a variable instead of a hard-coded search string in my ASP.NET code. I am not getting any results.
strSearch = "SELECT productID, productName from Products WHERE productName LIKE '%@searchphrase%'"
cmdSearch = New SqlCommand(strSearch, conMyData)
cmdSearch.Parameters.Add("@searchphrase", txtSearchPhrase.Text)
Thank you for any help you can give me,
Judy