Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connexion!!!

Status
Not open for further replies.

dadou

Technical User
Jun 22, 2003
4
FR
How can I connect Visual Fox Pro through SQL server?
 
You can set up a linked server. That way when you need to query you can use OPENQUERY et al and you don't have to keep typing connection information. First you'll need to set up a DSN on your SQL Box that points to your VFP data,in windows 2000 you'll find this in control panel\administrative tools\odbc in NT it will be in control panel. Be sure you use UNC to path to it if it is on a different box than your SQL Server, also be certain to uncheck the fetch data in background option as this will cause untold nastiness. Then go into the security folder on your SQL Enterprise Manager, right click on linked servers, select New linked server, then provide a name for it, under server type select other data source, in the provider name combo box select Microsoft OLE DB provider for ODBC, in the Product Name text box put MSDASQL, in the Data Source box put the name of the VFP DSN you created.
You can set information in the other tabs on this form but that should be enough. Then when you want to query the linked server use syntax like:
SELECT * FROM OPENQUERY(<your linked servername>,'Your VFP SQL Statement')
JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top