564 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Linking to ADO databases with VBA Part two of a five-part series of blogs |
---|
Learn how to write VBA macros to add, edit and delete data in Access, SQL Server and other databases, using something called ADO.
This blog is part of both a complete Excel VBA tutorial and a complete SQL tutorial. |
To link to data from within VBA, you will usually use the ActiveX Data Objects object library (ADO to its friends).
If you're writing VBA within Access, you may well prefer to use DAO (or the Direct Access Objects library) instead. You can Google ADO or DAO for more details.
You can create a reference to the ActiveX Data Objects library as follows:
Here's what the dialog box looks like:
Make sure you tick the box next to the library, rather than just selecting it in the list.
There are 7 different versions of ADO in the dialog box shown above - which one should you use? The short answer is: the highest version number. For more information on different versions of ADO, see this Microsoft ADO version history page.
Functionally ADO 2.8 and 6.0 are the same: the only difference is that 6.0 was provided for Windows Vista and later operating systems.
Now that you're referring to the ADO library, it's time to learn a little about esoterica such as connections and recordsets.
Parts of this blog |
---|
|
Some other pages relevant to the above blogs include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2023. All Rights Reserved.