G
Guest
I am attempting to do some exact string queries from C++, using ADO, to MS ACCESS. I have been unable to find much information concerning this. The text field in the ACCESS database is called "Data". It contains html text. A simple query in C++ looks like this
SELECT id FROM tblData WHERE (Data LIKE '%[!a-z]Happy Day[!a-z]%')
This works fine. It doesn't allow "Happy Daytime" "Happy Days" "Unhappy Day" etc. There is one glitch. If there is a carriage return between "Happy" and "Day", more than one space or both, it doesn't find the string. Is there any way around this. I usually test within ACCESS using a query like this
SELECT id FROM tblData WHERE (Data LIKE '*[!a-z]Happy Day[!a-z]*'
If I were to use a star as in "Happy*Day" then the words may not be consecutive. Any help would be much appreciated
Background: Application was created in VS 6.0 and has been converted to the .NET version but .NET capabilities are not being applied. The strings used in the searches come from a much larger set and the set is not static
SELECT id FROM tblData WHERE (Data LIKE '%[!a-z]Happy Day[!a-z]%')
This works fine. It doesn't allow "Happy Daytime" "Happy Days" "Unhappy Day" etc. There is one glitch. If there is a carriage return between "Happy" and "Day", more than one space or both, it doesn't find the string. Is there any way around this. I usually test within ACCESS using a query like this
SELECT id FROM tblData WHERE (Data LIKE '*[!a-z]Happy Day[!a-z]*'
If I were to use a star as in "Happy*Day" then the words may not be consecutive. Any help would be much appreciated
Background: Application was created in VS 6.0 and has been converted to the .NET version but .NET capabilities are not being applied. The strings used in the searches come from a much larger set and the set is not static