Share via


Accessing Data Using Office 2000 Developer Tools

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Databases exist on many platforms — Access, SQL Server, Oracle, and mainframes. The challenge is to take any form of data and make it available in Office 2000 applications. In Microsoft Office 2000 Developer, this is accomplished by using the ActiveX Data Objects (ADO), which is the premier technology for creating data connections.

Detailed documentation about the ADO object model can be found in the MSDN™ Library. See for an entry point into the documentation. More documentation about the ADO Data Control and the ActiveX Data Object Library can be found in Chapter 14, "," of the Microsoft Office 2000/Visual Basic Programmer's Guide.

For information about object models, see the and Chapter 4, "" in the Microsoft Office 2000/Visual Basic Programmer's Guide.

To access data that resides on almost any platform, the process requires four distinct parts.

  1. Data — the actual data, residing either on a server or on the same machine as the solution.

  2. OLE DB Data Provider — software that provides a connection to almost any platform. Office 2000 Developer includes OLE DB providers for Access, SQL Server, Oracle, and ODBC databases.

  3. Data Source — an intermediate software component that encapsulates the connection to the OLE DB data provider. Office 2000 Developer supplies three data sources: the ADO Recordset Object, the Data Environment designer, and the ADO Data Control.

  4. Data Consumer — the final software component that displays data, either a data-aware control, a non data-aware control bound to the data source using the BindingCollection object, or an Office application form. For example, you can display data by inserting a data-aware control, such as the Hierarchical FlexGrid, into several Office applications or by importing the data directly into an Excel worksheet using the functionality with the application.

Example Process for Displaying Data

In Office 2000 Developer, this process could be implemented in the following way.

  1. Determine which databases you require and their path(s).

  2. Configure either the Data Environment designer, the ADO Data Control, or ADO objects as data sources. (See Creating a Data Source Using Data Connectivity Tools for more details.)

  3. Determine which Office 2000 application will be used, and open a new document in the application.

  4. Open the Visual Basic Editor (ALT+F11).

  5. Insert the appropriate controls into the Office 2000 document or the Visual Basic UserForm to display the data. For more information, see Displaying Data from a Data Source.

    • If you are using data-aware controls or the Data Report, set the DataSource property to the data source created in step 2. (If you are using Data Environment configured with multiple connections, you will also have to specify a connection using the DataMember property.) For more information, see Using Data-Aware Controls in Office Applications.

    -or-

    -or-