|
-
Dec 20th, 1999, 01:45 PM
#1
Thread Starter
New Member
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?
-
Dec 20th, 1999, 07:13 PM
#2
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
[email protected]
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 12-21-1999).]
-
Dec 22nd, 1999, 02:16 PM
#3
Thread Starter
New Member
Thanks! I dont have to convert all of my DAO code then!
-
Dec 23rd, 1999, 12:30 PM
#4
Junior Member
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
-
Dec 24th, 1999, 04:46 AM
#5
Member
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
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|