Hello,
I am working on a web page that queries a microsoft access database for our library using wildcards, I have set up the queries using the CONTAINS expression, like so
My problem is that the CONTAINS statement acts no differently than the LIKE statement in that the words have to be in order to include spaces and commas.
What I want to do is make it so that multiple words in the same text box will create new wildcards in my SQL statement
(eg. text box= "word1 word2 word3" will translate into SQL as
using the space between the words to separate variables rather than read as a separate character.
Any help would be much appriciated.
I am working on a web page that queries a microsoft access database for our library using wildcards, I have set up the queries using the CONTAINS expression, like so
Code:
'"Select Command" Value part 1 Dim SelStat As String = "SELECT [Full Title] AS Full_Title, [Author List] AS Author_List, [Title Call Number] AS Title_Call_Number, [Series] AS Series, [Location] AS Location FROM [Library]" '"Select Command" Value part 2 Dim Where As String = " WHERE" '(Part 3 is set further below) '"Select Command" Value part 4 Dim Order As String = "ORDER BY [Title Call Number]" '... whereStatement = " CONTAINS (([Full Title], '%' + ? + '%')"
What I want to do is make it so that multiple words in the same text box will create new wildcards in my SQL statement
(eg. text box= "word1 word2 word3" will translate into SQL as
Code:
whereStatement = " CONTAINS (([Full Title], 'word1' AND 'word2', AND 'word3')"
Any help would be much appriciated.
Comment