Hello -
I often, for a quick data point lookup, use DAO, such as:
When looking up 1 or 2 data items, this is reasonably fast. But when doing a loop and looking up 1,000 data items, it gets slow.
Is there a faster way using ADODB to set the "rst" above?
Right now, I actually set rst = fnServerRecordset(sql) where that function does the basic coding shown above - just to lessen the coding needed for several lookup functions. Can I call a function in the same way with ADODB? I know I've used ADODB (using connection, command, etc.) to upload data to a server much faster than sending a sql INSERT command. So I'm thinking data requests can also be sped up? Sample coding help would be MUCH appreciated!
Thanks!!!
I often, for a quick data point lookup, use DAO, such as:
Code:
Dim sql as string, qdf As DAO.QueryDef, rst as DAO.recordset
sql = "SELECT BirthDate FROM tblPerson WHERE Name = 'John'"
Set qdf = CurrentDb.CreateQueryDef("")
qdf.Connect = CONNECTION_STRING
qdf.ReturnsRecords = True
qdf.sql = sql
Set rst= qdf.OpenRecordset
Etc...
When looking up 1 or 2 data items, this is reasonably fast. But when doing a loop and looking up 1,000 data items, it gets slow.
Is there a faster way using ADODB to set the "rst" above?
Right now, I actually set rst = fnServerRecordset(sql) where that function does the basic coding shown above - just to lessen the coding needed for several lookup functions. Can I call a function in the same way with ADODB? I know I've used ADODB (using connection, command, etc.) to upload data to a server much faster than sending a sql INSERT command. So I'm thinking data requests can also be sped up? Sample coding help would be MUCH appreciated!
Thanks!!!