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
- Choose the Administrative Tools icon from the Windows Control Panel.
- Choose the Data Sources shortcut.
- 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.
- 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
- Switch to the Windows Control Panel and choose the ODBC icon.
- In the Data Sources dialog box, choose Add.
- In the Add Data Source dialog box, select the SQL Server ODBC driver and choose OK.
- In the ODBC SQL Server Setup dialog box, enter the data source name, description, and other appropriate information, and then choose OK.
- In the Data Sources dialog box, choose Close.