DAO or ADO?

Mark O'Brien

MrExcel MVP
Joined
Feb 15, 2002
Messages
3,530
Out of interest, which do most people prefer to usewhen messing around with VBA in Access? ADO or DAO?

Are there some things that are easier with ADO or vice versa?

I'm beginning to see some things in Excel VBA that are easier with obsolete objects rather than their replacements. However, since my DB is going to last 20 years...oh hold one.... :ROFLMAO: :ROFLMAO: :ROFLMAO: :ROFLMAO: ...I'd like to think that my DB will still work if I choose ADO over DAO.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Mark O'Brien said:
However, since my DB is going to last 20 years...oh hold one.... :ROFLMAO: :ROFLMAO: :ROFLMAO: :ROFLMAO: ...I'd like to think that my DB will still work if I choose ADO over DAO.

Don't bet your house on it, once Vb .Net is standard in Access you'll certainly need to change/convert your code. How do feel about Access now? :biggrin:

I personally think DAO is more straight-forward, but Microsoft must've found it to be less robust than the ActiveX Data Object model, otherwise they probably would have ramped DAO up, versus trashing it. Be careful when you write your code, i.e., don't just pull the wisenheimer:

dim rs as recordset

Specifically declare whether it's ado or dao, e.g.,

dim rs as ADODB.recordset

Otherwise, you're actually rolling the dice regarding the placement (priority) of library references, unless you specifically know. Good habbit though, won't hurt ya.

Are you sure your data's normalized? :LOL:
 
Upvote 0

Forum statistics

Threads
1,221,547
Messages
6,160,456
Members
451,647
Latest member
Tdeulkar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top