Share via


Data Source Tab, DataEnvironment Builder

Specifies the data source type and data source to use, if needed.

Note

When accessing tables in Microsoft Access, particularly tables that have spaces in column names, you should use the Microsoft OLE DB Provider for Access instead of the Microsoft Access ODBC driver and specify ADO as the data source type. To choose the OLE DB Provider for Access, on the Data Source tab, select ADO in the Data source type box. Click Use connection string, then the Build button to continue constructing the connection string to the Access database.

  • Data source type
    Specifies the data source type. Depending on the data source type selected, you can select or build one of the following data sources:

    • ADO

      Specifies one of the following ways to establish an ActiveX Data Objects (ADO) connection.

      Use existing ADO Recordset   Specify a reference to a valid ADO RecordSet object. This reference must be valid at design time if the CursorAdapter Builder is to use this RecordSet.

      Use DSN   Specifies a data source name (DSN) from the Data source list and values in the User ID and Password boxes, if applicable.

      In most cases, selecting a DSN for an ADO connection results in using the Open Database Connectivity (ODBC) driver specified by the DSN through the MSDASQL OLE DB Provider for ODBC. Certain OLE DB providers can map the ODBC DSN settings to the corresponding settings in the corresponding OLE DB provider.

      Note

      You should not use a DSN name if the OLE DB provider cannot map ODBC DSN settings. You can use an ODBC driver for a data source that does not have an OLE DB provider.

      Use connection string   Specifies a valid connection string. This is the same type of connection string that you enter for the ADO ConnectionString property.

      Alternatively, you can select the Build button to display the Data Link Properties dialog box. You can then select the appropriate OLE DB Provider and other necessary connection string parameters.

    • Native

      Specifies a valid database name and path in the Database box. You can browse for and select a database to use by clicking the ellipsis (...) button to display the Select Database dialog box.

    • ODBC

      Specifies one of the following ways to establish a database connection.

      Use existing connection handle   Specifies a property, memory variable, value, or expression that evaluates to a valid connection handle at run time.

      Use DSN   Specify a data source name (DSN) from the Data source list and values in the User ID and Password boxes, if applicable.

      Use connection string   Specifies a valid connection string. This is the same type of connection string that you enter for the SQLSTRINGCONNECT( ) function. For more information, see SQLSTRINGCONNECT( ) Function.

    • XML

      Specifies XML as the data source.

See Also

Reference

DataEnvironment Builder

Cursors Tab, DataEnvironment Builder