Quantcast
Channel: MySQL Forums - Microsoft Access
Viewing all articles
Browse latest Browse all 487

DAO seek Method (no replies)

$
0
0
I have to migrate an application from Access to MySql
I use ADO and ODBC MySQL 5.2 w Driver instead of DAO.
In the old application I was using the Seek method of DAO to access MsAccess table, As the seek method of ADO does not work with MySql I tried the Open method of the ADO Recordset object but is much slower:

Example1: VB6, ADO, with 600,000 Records Table = > time spent 11 seconds

For X = 0 To 10000
sql = "SELECT * FROM MyTable WHERE Id = 123456789"
RsADO.Open sql, cn, adOpenDynamic, adLockOptimistic
RsADO.Close

sql = "SELECT * FROM MyTable WHERE Id = 987654321"
RsADO.Open sql, cn, adOpenDynamic, adLockOptimistic
RsADO.Close
Next


Example2: VB6, DAO, with 600,000 Records Table => 0.06 sec Time seconds

RsDAO.Index = "Id"
For X = 0 To 10000
RsDAO.Seek "=", 123456789#

RsDAO.Seek "=", 987654321#
Next


Is there a way to have the same performance of the Seek method with ADO and MySql?

Thank you

Viewing all articles
Browse latest Browse all 487

Trending Articles