Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


ADO Find vs DAO Seek Access Example from a User

Keywords: 	   ADO Find vs DAO Seek Access

Below is a link that includes the International Dialing table in ACCESS, and two scripts.

1 uses DAO. The OTHER ADO/OLE DB.

Also included are two text files which read in sample data to do a 'lookup' in the ACCESS table.

The DAO script uses the Seek() function, as the table in Indexed. It is pretty straight forward, and the output is displayed in Notepad.

The ADO Script uses the Supports() method to determine if the Provider supports Seek or Find then uses the appropriate one.

Note that Seek is Only supported with Office 2000 Access Databases (mine is 97).

What is more, seek is not supported for SQL Server or the MS Oracle Driver.

Microsoft (in the MSDN for Seek() ) says that the Jet 4.0 Provider supports seek, but my script tends to indicate the opposite - which you can see because the Output file indicates what is supported.

ADO Find seems to outperform DAO seek (which is and isn't surprising, as supposedly OLE DB utilizes an additional layer.).

There are comments as to where the values for the Supports() came from, and how the appropriate enum for the Recordset ( seek only works if a RecordSet is opened as a table, not a query or SQL Statement).

As always, comments and criticisms are welcomed and appreciated.

stan littlefield
stanl@btitelecom.net

Ado_dao.zip 

Article ID:   W14662
Filename:   ADO Find vs DAO Seek Access Example.txt