Article ID: 279761 - View products that this article applies to.
This article was previously published under Q279761
This article has been archived. It is offered "as is" and will no longer be updated.
This article describes how to use the Microsoft ADO for Windows CE SDK (ADOCE) 3.1 Seek method with SQL Server 2000 Windows CE Edition.
One of the most widely used methods by clients on SQL Server CE indexes is Seek. The Seek method provides the ability to find rows on a cursor very quickly. For the seek to work properly, Seek requires that an index be defined on the columns in the search key.
To use the Seek method you must have an index to match the seek expression on the base table and your recordset Open method must use the adCmdTableDirect flag.
The Seek method locates a record in an indexed recordset and makes that record the current record.
Seek takes an array of Variant values as its first parameter. Each element of the array must contain a value to compare against each corresponding column in the index. For example:
The following code demonstrates how to do a multi-column Seek on a SQL Server CE table:
DataAccess 3.1 Books Online, topic: "Seek"
SQL Server CE Books Online, topic: "Seek"