This topic is locked

Search String

7/31/2007 11:51:53 PM
ASPRunner.NET General questions
N
nolim8ts author

I'm trying to write a search string to search a certain database column based on a value. When the string is executed, it will return nothing and for it to return something, it has to be the exact value which is stored in the database. Below is the string.

strSearch = txtSearch.Text
strSQLQuery = "SELECT * FROM AUDIT WHERE ((NAME) CONTAINS '" & strSearch & "') ORDER BY Time"


This query will return nothing unless the exact value which is stored in the database is entered into the textbox. Any idea's?

Eugene 8/1/2007

try to use next syntax:
strSQLQuery = "SELECT * FROM AUDIT WHEREE CONTAINS([NAME], ' """ + strSearch + """ ')