Results 1 to 5 of 5

Thread: Whats faster - ADO or DAO

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Location
    Glendale Hts, IL USA
    Posts
    15

    Post

    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?

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    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).]

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Location
    Glendale Hts, IL USA
    Posts
    15

    Post

    Thanks! I dont have to convert all of my DAO code then!

  4. #4
    Junior Member
    Join Date
    Dec 1999
    Location
    houston,tx
    Posts
    20

    Post

    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

  5. #5
    Member
    Join Date
    Dec 1999
    Posts
    37

    Post

    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
  •  



Click Here to Expand Forum to Full Width