11
Data Access with ADO
ActiveX Data Objects, or ADO for short, is Microsoft's technology of choice for performing client-server data access between any data consumer (the client) and any data source (the server or provider). There are other data-access technologies of which you may have heard in relation to Excel, including DAO and ODBC. However, these will not be covered in this chapter as Microsoft intends for these older technologies to be superseded by ADO, and for the most part this has occurred.
ADO is a vast topic, easily the subject of its own book. In fact, Wrox has published several excellent books exclusively on ADO, including the ADO 2.6 Programmer's Reference (ISBN 1-861004-63-x) and Professional ADO 2.5 Programming (ISBN 1-861002-75-0). This chapter will necessarily present only a small subset of ADO, covering the topics and situations that you will frequently find useful in Excel programming. For a more detailed look at ADO, we strongly recommend one of the dedicated volumes mentioned above.
As a freestanding, universal data-access technology, ADO has evolved rapidly over the past several years, much more rapidly than the programs that use it. As of this writing, there are several versions of ADO in common use, including: 2.1, 2.5, 2.6, and 2.7. This chapter will focus on ADO 2.7. This is the version of ADO that ships natively with the newest version of Windows and Office. If you aren't running one of these applications and don't have ADO 2.7 installed, you can ...
Get Excel 2003 VBA Programmer's Reference 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.