WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADO DAO
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2017:08:29:11:58:40
Last Updated: 2017:08:29:11:58:40