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
Expand|Select|Wrap|Line Numbers
- '"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
Expand|Select|Wrap|Line Numbers
- whereStatement = " CONTAINS (([Full Title], 'word1' AND 'word2', AND 'word3')"
Any help would be much appriciated.