ADO - recordset find performance slow

G

Guest

I have a couple of applications that use ADO to update recordsets (SQL) from
an excel interface.

After opening a recordset, I set it to the beginning of the file and then do
a find.

It works, but takes several minutes to find the record.

There are only a few hundred records.
I can use the CopyFromREcordset all records appear in seconds.

I'm using the Find to select the record to edit.

Any ideas how I can speed things up?
 
G

Guest

I guess I don't know how to do that.
Here's a code snippet of what I have.
I don't see query from variable "rs"


Sub TestIt()
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.Open TheConnectionString
Set rs = New ADODB.Recordset
rs.Open TheRStable, cn, adOpenKeyset, adLockOptimistic, adCmdTable
rs.Find "criteria here"
'Close connections, etc
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top