I'm trying to execute a full-text query from a vb.net web application.
The problem I have is that in SQL Server, the syntax for a full-text
search is
SELECT *
FROM table
WHERE CONTAINS( *, ' "searchstring" ')
For whatever reason, VB won't run that search string unless I eliminate
the double sets of quotes:
SELECT *
FROM table
WHERE CONTAINS( *, "searchstring")
This will not work for a search phrase - only single words, and it also
will not work for a wild card:
SELECT *
FROM table
WHERE CONTAINS ( *, "search*")
The above does not work - I must assume that the double quotes are
needed for both wild card searches and exact phrase searches -
The problem of course is that in vb code the SQL string is already
enclosed in search quotes - the single quotes are then used to indicate
double quotes within the search.
I have tried using two single quotes on either side of the string, but
it doesn't seem to work. ie:
"SELECT * FROM table WHERE CONTAINS ( ' '" & textbox1.text & "' ')"
Does anybody have any ideas?
Trevor Fairchild
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!