Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO slower than RDO?

Status
Not open for further replies.

jsteel

Programmer
Feb 11, 2005
17
0
0
US
My company is in the process of changing all code from using RDO to ADO to connect to oracle.

I ran a simple test program which opens a connect to oracle from both at the same time. I then ran several queries to time the speed of the two. For small queries RDO worked twice as fast. For larger ones combining more than 1 table, ADO was rediciously slow. Most of the RDO queries would take a few hundred milliseconds, but ADO would take tens of thousands.

Am I doing something wrong here?

Here is the code I am using to connect with ADO.

Dim db As ADODB.Connection
Set db = New ADODB.Connection

db.CursorLocation = adUseClient

db.Open "Provider='MSDAORA';Data Source=...;User ID=...;Password=...;"

Dim adoPrimaryRS As ADODB.Recordset
Set adoPrimaryRS = New ADODB.Recordset

sSql = "SELECT * FROM table"

adoPrimaryRS.Open sSql, db, adOpenDynamic, adLockOptimistic

I also tried with just (adoPrimaryRS.Open sSql, db) but it didnt change anything.

Thanks a lot
 
I have found the solution.

db.CursorLocation = adUseServer

voila! RDO uses this method and ADO does run faster now
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top