|
-
Jun 10th, 2004, 01:20 AM
#1
Thread Starter
Hyperactive Member
-
Jun 10th, 2004, 05:01 AM
#2
Assuming you are working on an access db - DAO is faster because it was optimised for Access. If you search online of for other threads this is explained.... Microsoft site have a bit on it.
It also depends on your skills as a programmer, in the way you update it etc, as you can increase the time it takes to update a record in one method to the other.
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 10th, 2004, 07:45 AM
#3
PowerPoster
I found that just using SQL statements was much slower on an ACCESS db. Now that I am converting to SQL Server, the SQL statements run much faster. If I had to do it again, and was staying with ACCESS, I woudl stay with DAO, unless there is a reason I needed ADO.
-
Jun 10th, 2004, 10:31 AM
#4
Member
Originally posted by Ecniv
Assuming you are working on an access db - DAO is faster because it was optimised for Access.
Vince
he is using different methosds to access/update database...
in my own experience... IMHO ADO is much-much more faster ... but depends, how do access the DB
-
Jun 10th, 2004, 11:50 AM
#5
DAO was optimized fgor Access (both were built upon the Jet DBEngine). ADO is optimized for "higher" enterprise type databases, SQL Server, Oracle, etc.
When using ADO to do work on an Access DB, it has to go through additional layers, which is why it seems slower. If the comparison was DAO/Access vs. ADO/SQL Server, I'd put my money on ADO/SQL.
BTW: The DAO code to insert, could also be used as is (changing datatypes to ADO) in ADO.
TG
-
Jun 10th, 2004, 10:03 PM
#6
Thread Starter
Hyperactive Member
Ok,
'ADO
do while not rs.eof
rs.addnew
rs.fields!firstname
rs.update
loop
'DAO
do while not rs.eof
rs.addnew
rs.fields!firstname
rs.update
rs.update
If like this ADO would faster than DAO ?(in Acc97)
can anyone give me a tip that how to do it faster? or this is ok?
actually i would like to copy from 1 tbl to another one but dont want to copy all record.
below is my code that i was used to update a record which is in criteria.
'ADO
do while not rs.eof
sql="Update tbl1 set firstname='" & rs2.!fields!firstname & "' where ID>50"
loop
'DAO
do while not rs.eof
if rs!fields!ID>50 then
rs.edit
rs.fields!firstname=rs2.fields!firstname
rs.update
loop
which is faster,any bug in my code
thank you very much for all help this will help me to improve my skill
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
|