O'Reilly logo

Excel 2003 VBA Programmer's Reference by Robert Rosenberg, Rob Bovey, John Green, Stephen Bullen, Paul T. Kimmel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required