Opening a Database Using DAO

So far, this chapter has focused on opening a database using ADO. If you don't have access to ADO, or if you're opening a database that uses the Jet database engine (as a practical matter, this means Microsoft Access databases), you should consider using DAO instead.

As mentioned earlier in this chapter, DAO is optimized for Jet and you'll get better performance using DAO on Jet databases than using ADO. (Admittedly, the delta isn't large.) And DAO syntax is identical to ADO syntax in many ways, so when it comes time to shift your code from using DAO to using ADO, the change will not be as painful as it might have been to shift from, say, Lotus 1-2-3 to Excel.

Declaring a DAO Database

You begin using DAO to access ...

Get Managing Data with Microsoft® Excel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.