Partager via


Setting Up an ODBC Data Source

Before you can create remote views or use SQL pass-through, you must install an ODBC driver and set up an ODBC data source.

Choosing an ODBC Driver

To install the ODBC drivers for these types of data, use the Visual FoxPro Setup program. If you choose the Complete install option, all drivers are installed.

Once you've chosen a driver, you can use the default data source or add an ODBC data source for it.

To add an ODBC data source

  1. Choose the Administrative Tools icon from the Windows Control Panel.
  2. Choose the Data Sources shortcut.
  3. In the ODBC Data Source Administrator dialog box, click Add, then select the driver you want from the Installed ODBC Drivers list and choose OK.
  4. In the Setup dialog box, set option values as necessary and choose OK.

For information on setting up a data source specific to the driver you have chosen, choose the Help button in the ODBC Setup dialog box.

Installing ODBC Data Sources

You can get Open Database Connectivity (ODBC) support if you choose the Complete or Custom installation option. With ODBC, you can access a SQL Server data source from Visual FoxPro; however, before you can access the data source, you must define it.

Connecting Visual FoxPro with ODBC data sources

To define a data source

  1. Switch to the Windows Control Panel and choose the ODBC icon.
  2. In the Data Sources dialog box, choose Add.
  3. In the Add Data Source dialog box, select the SQL Server ODBC driver and choose OK.
  4. In the ODBC SQL Server Setup dialog box, enter the data source name, description, and other appropriate information, and then choose OK.
  5. In the Data Sources dialog box, choose Close.

See Also

Installing Visual FoxPro | Upgrading from Earlier Versions