Article ID: 243465 - Last Review: June 23, 2005 - Revision: 2.0 ACC2000: How to Use the Seek Method with ActiveX Data Objects (ADO) Against a Jet RecordsetThis article was previously published under Q243465 Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies only to a Microsoft Access database (.mdb). For a Microsoft Access 2002 version of this article, see 287638 (http://support.microsoft.com/kb/287638/EN-US/ ) . SUMMARY
This article demonstrates how to use the Seek method with an ActiveX Data Objects (ADO) recordset. Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. MORE INFORMATION
The following example illustrates how to use the Seek method to find a customer order with a particular Order ID and Product ID. If found, the example prints the quantity of the customer order in the Immediate window. Usually, you can choose between using a client-side cursor library or one that is located on the server. In order for the Seek method to function, you must use a server-side cursor, as denoted in the CursorLocation property in the following code. Also, you can only use the Seek method when a recordset is accessing the table directly. In this example, the recordset is instructed to access the table directly by the adCmdTableDirect argument in the Open method. You cannot use the Seek method on objects such as queries and linked tables. You can only use the Seek method on native Microsoft Jet tables. If your database contains linked tables, you can open an external connection to the back-end database that stores the table, and then use the Seek method directly on the table.
REFERENCESFor additional information about using the Seek method with Microsoft Jet tables, click the article number below
to view the article in the Microsoft Knowledge Base:
249683
(http://support.microsoft.com/kb/249683/EN-US/
)
ACC2000: Error Setting Index Property of ADO Recordset Based on a Microsoft Jet Database
| Article Translations
|
Back to the top
