Click to See Complete Forum and Search --> : Whats faster - ADO or DAO
uol98
Dec 20th, 1999, 12:45 PM
I have a large scale project which will require a huge amount of data (36k records from 20 tables) to be updated, deleted, and searched on. What is faster, ADO or DAO?
Serge
Dec 20th, 1999, 06:13 PM
If you're talking about Microsoft Access database, then DAO is still a little bit faster. But to have your project compatible with later version, you better use ADO. According to Micro$oft, ADO will be the only library that they're going to support in future version (even though DAO I think would be there for a while too).
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
[This message has been edited by Serge (edited 12-21-1999).]
uol98
Dec 22nd, 1999, 01:16 PM
Thanks! I dont have to convert all of my DAO code then!
leif-p
Dec 23rd, 1999, 11:30 AM
Converting over to ADO is not that bad and for my uses, only involved changing the code that opened the .mdb file and made the recordset or "snapshot". I name the recordset "Mysnap" below to represent a Dynaset Snapshot.
The following code opens the table "Employee_records" in the myfile.mdb access file. At the end I show how you can loop thru the file the same way as in DOA and set variables the same way as in DAO.
'open myfile.mbd and table "Employee_records"
Set cnn1 = New ADODB.Connection
strCnn = "Provider=Microsoft.Jet.OLEDB.4.0; Data source = c:myfile.mdb;Password=;"
cnn1.Open strCnn
Set mysnap = New ADODB.Recordset
mysnap.CursorType = adOpenKeyset
mysnap.LockType = adLockOptimistic
mysnap.Open "Employee_records", cnn1, , , adCmdTable
'Loop thru all records in recordset MySnap to pull out values for "name" field and "phone" filed for each employee
Do Until Mysnap.EOF
name=Mysnap!name
phone=Mysnap!phone
Mysnap.Movenext
Loop
Be sure to use the MySnap.Movenext command or you can't loop thru the records. But the do loop is not different in DAO and ADO, only the first set of lines are.
-lp
Ruchi
Dec 24th, 1999, 03:46 AM
I have learned from my class about ADO and DAO.
According to the professor's notes, ADO was introduced to eventually replace DAO and RDO. It is more compact, faster, capable of accessing a larger variety of data, and more flexible.
------------------
Ruchi
ruchivb@yahoo.com
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.