how to link visual fox pro dbf to the MS SQL 2005 in real time

Hi Experts,
I have some visual fox pro dbf file which is being used by the users. I need to link the all .dbf file with the MS SQL 2005 to get data in real time and create some new store procedures.
Is there any way?
Please help
Rgds.
Iqbal
MehramAsked:
Who is Participating?
 
Aneesh RetnakaranDatabase AdministratorCommented:
This is coming really late, but the following process worked for me when trying to query DBF files using only one linked server and ODBC connection.

Installed Visual FoxPro ODBC drivers on server. (http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx)
(http://download.microsoft.com/download/vfoxodbcdriver/Install/6.1/W9XNT4/EN-US/VFPODBC.msi)

Installed Visual FoxPro ODBC bugfix on server. (http://support.microsoft.com/kb/191685/EN-US/)
(http://download.microsoft.com/download/vfox60/sample10/1/w9x/en-us/vfp6int.exe)

Setup System ODBC connection to point to local directory containing DBF files. I used the "Free Table Directory" option in the setup. Also, I could not get it to work over a share. IMPORTANT: The files had to exist on the server running SQL server.

Setup a linked server on the SQL server using the following properties:
Linked server - [Name of linked server]
Provider - "Microsoft OLE DB Provider for ODBC Drivers"
Product Name - "Microsoft Visual FoxPro Driver"
Data Source - [Name of your System ODBC connection]

After this the following query worked perfectly:
Select * from OPENQUERY('Select * from {filename}')

Even better, the following one worked also!
Select * INTO {TableName} from OPENQUERY('Select * from {filename}')

As you can see, any filename can be used dynamically within the query, allowing for only one Linked Server and ODBC connection.

Source :  http://www.sqlservercentral.com/Forums/Topic285021-146-1.aspx#bm639303
0
 
MehramAuthor Commented:
Sir, thanks for the detail help. Is it same way for foxpro 4 dbf?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.