Microsoft Office 2000 Developer   

Creating a Data Source Using the ADO Data Control

See Also

The ADO Data Control (ADODC) is a data source that differs from the Data Environment designer in a few significant ways.

The ADODC allows you to quickly create connections between data-bound controls and data providers using the simplicity of ADO. For Office developers who are comfortable with RDO, ADODC is similar in function, but is significantly more powerful than RDO.

For More Information   For an overview of the ADO Data Control, see "Using the ADO Data Control" in the Visual Basic Programmer's Guide. For reference information, see ADO Data Control.

To create a data source using the ADO Data Control

  1. Draw an ADO Data Control on a host form. See Activating and Inserting Controls for information.

  2. Right-click the new control, and click ADODC Object. Then click ADODC Properties to display the ADODC Properties dialog box.

  3. On the General tab, select a Source of Connection option:
  4. If the database requires a user ID and a password, click the Authentication tab, and fill in the User Name and Password boxes.

  5. Click the RecordSource tab.

  6. From the Command Type list, select an option. The options are a subset of those available for the ADO Recordset object's CommandType property, which specifies how the record source text will be evaluated:
  7. Click OK.

The ADO Data Control is a visual tool that allows you to quickly and easily configure a data source at design time.

To configure the ADO Data Control data source

  1. Set the correct OLE DB provider.

  2. Set the path to the database.

  3. Set user name and password if needed.

  4. Set read/write privileges.

  5. Set other settings that initialize the database.