first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

VB: ADO; Using SQL Wildcards Against Access Databases; Access 2000

If you should ever have the misfortune of opening an Access database from ADO you will run into problems that Microsoft recognizes as bugs and has even released fixes in response to them. The main problem is trying to use the LIKE predicate and wildcard characters. There are quite a few Microsoft Knowledgebase articles that deal with the problem. Search it yourself.

As of this writing, there are only two things that effectively deal with this issue: using ADO 2.5 or above and understanding that ADO can use the wildcards (and character string delimiters) for SQL Server on Access databases. Using ADO 2.5 and above implies that you have all of the known bug fixes. Using SQL Server wildcards on Access databases, I assume, is a poorly communicated design goal of the "ADO team": the effort in translating ADO, dynamic SQL for Access to SQL Server (and vice versa) is reduced if the wildcards and character string delimiters are the same.

Microsoft deals with the issue in the most up-to-date detail in "Intermediate Microsoft Jet SQL for Access 2000" at:

http://msdn.microsoft.com/library/en-us/dnacc2k/html/acintsql.asp

After a table of possible wildcards, you should find the words, "The '%' and '_' wildcard characters in the previous table can be executed only through the Jet OLE DB provider and ADO. They will yield an empty result set if used through the Access SQL View user interface." This implication here should be clear.

mod date: 2001-07-24T01:37:36.000Z