adOpenStatic Logo
Navigation
Home
Resources
ASPMSAccess FAQ
Contact Ken
Copyright 2000 -




When you do a LIKE query using ADO against an Access database you can't use * as a wildcard character. Instead you need to use %.

This is because * is something unique to the Access JET SQL Syntax, but is not part of the ANSI SQL 92 standard. In order for ADO/OLEDB to pass the query through to Access you need to stick to the ANSI SQL standard.

strSQL = "SELECT field1 "
strSQL = strSQL & "FROM table1 "
strSQL = strSQL & "WHERE field1 LIKE '%" & strSearchTerm & "%'"
Back to FAQ listing.