I am in the process of converting a program from a DSN connection using the Workspace object to ADO - DSN-less. I have the program completed, but with ADO, it runs much slower. Can anyone give me any tweaking advice?
Here's my connection:
With conServer
.ConnectionString = "Provider=SQLOLEDB;" & _
"INITIAL CATALOG=<DBName>;" & _
"USER ID=<UID>;" & _
"PASSWORD=<PWD>;" & _
"DATA SOURCE=<Datasource>"
.Open
End With
Here's my recordset:
Set rstServer = New ADODB.Recordset
With rstServer
.ActiveConnection = conServer
.CursorLocation = adUseServer
.LockType = adLockReadOnly
.CursorType = adOpenForwardOnly
End With
The program is for reporting and runs multiple small sql statements that each return a count, so the recordset of each is a single record.
Thanks,
drost
Here's my connection:
With conServer
.ConnectionString = "Provider=SQLOLEDB;" & _
"INITIAL CATALOG=<DBName>;" & _
"USER ID=<UID>;" & _
"PASSWORD=<PWD>;" & _
"DATA SOURCE=<Datasource>"
.Open
End With
Here's my recordset:
Set rstServer = New ADODB.Recordset
With rstServer
.ActiveConnection = conServer
.CursorLocation = adUseServer
.LockType = adLockReadOnly
.CursorType = adOpenForwardOnly
End With
The program is for reporting and runs multiple small sql statements that each return a count, so the recordset of each is a single record.
Thanks,
drost