Visual FoxPro driver for 64 bit Windows 7

Viewed 67545

I've installed Visual FoxPro driver from this link on my 64 Bit Windows 7 Home Premium OS and tried to register vfpoledb.dll using REGSVR32. I could able to register this dll but when run my application which accesses VFP database is throwing the following error:
System.InvalidOperationException: The 'VFPOLEDB.1' provider is not registered on the local machine.

The same application is working fine in 32 bit Windows 7 Home Premium OS without any issues. I have googled for 64 bit VFP driver and found out that there are no VFP drivers for 64 bit OS from this link. Kindly help me to resolve this issue.

3 Answers

It's a bit late, but may help somebody else:) You can use Advantage OLE DB Provider for Windows 64-bit, which works like VFPOLEDB. Example in python:

conn = win32com.client.Dispatch('ADODB.Connection')
dsn = 'Provider=Advantage OLE DB Provider;Data Source=%s; ServerType=ADS_LOCAL_SERVER; TableType=ADS_VFP;' % folder
conn.Open(dsn)
cmd.CommandText = 'ALTER TABLE test ALTER COLUMN area NOT NULL'
cmd.Execute()

A blog post by Eric Selje, of Salty Dog Solutions, describes how to run the 32-bit drivers on 64-bit Windows. (You must set them up in the 32-bit ODBC Administrator.)

  1. Visual FoxPro, a 32-bit application, runs just fine on 64-bit machines.
  2. Visual FoxPro cannot use 64-bit ODBC drivers however.
  3. You can use 32-bit ODBC drivers on 64-bit Windows, but you must set them up in the 32-bit ODBC Administrator. This is not the one that’s going to come up if you go through Control Panel. To invoke it, run C:\Windows\SysWow64\odbcad32.exe and add your DSNs there.
  4. Do not just Start, Run, ODBCAd32.exe, as it will not bring up the right one.
  5. The 32-bit drivers for SQL Server come with Windows 7 x64, so you don’t have to download them.
Related