O'Reilly logo

Access™ 2007 VBA Programmer's Reference by Armen Stein, Geoffrey Griffith, Rob Cooper, Teresa Hennig

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

7.10. Creating Schema Objects with ADOX

So far I've been working with the ADODB library, which is the library to use when you want to work with database data. The ADOX library is the one you use when you want to work with the database schema, such as tables, views (queries), indexes, and so on.

To implement ADOX, you need to add a reference to it. Open any code module by pressing Alt+F11, and select Tools References. The References dialog box displays. Locate and select ADO Ext. 2.7 for DDL and Security, and click OK.

7.10.1. The ADOX Object Model

The ADOX model contains one top-level object, Catalog, which contains five collections: Tables, Groups, Users, Procedures, and Views, as illustrated in Figure 7-3.

Figure 7.3. Figure 7-3

Each of the Table, Index, and Column objects also has a standard ADO Properties collection, as shown in Figure 7-4.

Figure 7.4. Figure 7-4

7.10.2. Working with Queries (Views)

Because ADO is part of its UDA strategy, Microsoft thought that the term query failed to adequately describe the mechanism for retrieving data from a source that could be almost anything. As described earlier, ADO can retrieve data from many different sources, not just the ACE ...

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