ACC97: IDC Parameter Queries Cannot Use LIKE and Wildcards (163893)
The information in this article applies to:
This article was previously published under Q163893 Advanced: Requires expert coding, interoperability, and multiuser skills.
SYMPTOMS
When you browse to an IDC file that was exported from Microsoft Access 97,
the Web browser returns the following error:
Expression cannot be used with the LIKE predicate in query expression.
CAUSE
Because IDC files communicate with ODBC drivers in order to query the
back-end data, the SQL statements they contain have different character
requirements than typical Microsoft Access SQL statements. IDC files use
the percent sign (%) as a wildcard character whereas Microsoft Access uses
the asterisk (*). When Microsoft Access exports a query that contains a
parameter concatenated with an asterisk, the SQL statement that is
generated contains a parameter concatenated with a percent sign. However,
the IDC SQL statement does not need the concatenation operator (&).
Instead, it simply needs a series of percent signs (%) to be placed after
the parameter.
RESOLUTION
Edit the SQL statement in the IDC file so that it doesn't use a
concatenation operator, but instead uses the appropriate sequence of
percent signs (%).
REFERENCES
For more information about exporting IDC files, search the Help Index for
"IDC files," and then choose "Export a datasheet to dynamic HTML format,"
or ask the Microsoft Access 97 Office Assistant. In addition, please refer
to the IIS Help Index.
For more information about using wildcards in IDC files, please see the
following article in the Microsoft Knowledge Base:
147361 How to Use Wildcards in IDC Files
Modification Type: | Minor | Last Reviewed: | 1/26/2005 |
---|
Keywords: | kbbug kbinterop KB163893 |
---|
|