ActiveX Data Objects (ADO) may return no data with the SQLOLEDB provided under the following conditions:
- The Prepared property on the command object is set to TRUE.
- The query has a parameterized LIKE clause.
- The column included with the LIKE clause is defined as CHAR (and not as VARCHAR) at the back end.
- The parameter value has fewer characters than the back-end column size.
- You are connecting to either a Microsoft SQL Server 7.0 or SQL Server 2000 database. If it is a SQL Server 2000 database, the Defer Prepare property is set to FALSE on the command object.
This problem occurs with the versions of ADO that are listed in the beginning of this article.