In Visual FoxPro, Using 32-bit ODBC Drivers on 64-bit Windows

This has been alluded to in a few places, but I want to get this down so I don’t forget it.

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.

That is all. I hope this helps future me, and possibly future you.


Posted

in

,

by

Tags:

Comments

33 responses to “In Visual FoxPro, Using 32-bit ODBC Drivers on 64-bit Windows”

  1. techone Avatar
    techone

    Will Visual FoxPro 9 work with Win 7?

  2. Chris Avatar
    Chris

    Salty Dog,

    If I could hug your neck I’d do it. Thanks, this helped me a lot. I’m the first one in my group to get a 64bit system, and as we still have a lot of legacy VB6 and VF6 applications and free tables, this of course was much needed – and much appreciated!

    Regards,

    Chris.

  3. Jorge Avatar
    Jorge

    Salty Dog,

    Let me join your fan club. Your solution was right on the money!

    Jorge

  4. Eric Avatar

    @TechOne, Yes VFP9 works very well with Windows 7, 32 and 64-bit. Glad I could help you all.

  5. Sergio Seijas Avatar

    I am from Guatemala in Central America. A very important data base for my company is in visual fox free tables. I just migrated from windows xp to windows 7. So, You saved me a lot of work. God bless you.

  6. Abid Avatar

    Saved my day

  7. Fabio Reinert Avatar
    Fabio Reinert

    After hours looking for a solution, it’s here. Thanks a lot. I finished tests with it and it works, finally. Obrigado (kkk).

  8. Marvin (NL) Avatar
    Marvin (NL)

    This is incredible! I’ve searched for months trying to find a solution. Thx a million!

  9. Kristof Avatar
    Kristof

    What can I do so my visual foxpro application will use these odbc drivers and not tries to use the 64bit odbc connections

  10. Chris Avatar
    Chris

    Kristof,

    We have found that we have better reliability if we put the ODBC entries under both User DSN and System DSN. Also, if you are using Fox Pro DBFs as free tables then you have to Configure the Visual FoxPro Database entries as ‘Free Table Directory’, not ‘Visual FoxPro Database’. Best of luck to you.

  11. Mark Avatar

    Thanks for this!

  12. stanley Avatar
    stanley

    Can I create a DSNless connection to the 32 bit drivers on a 64 bit system? What is the process?

    Thanks, Stanley

  13. Phil Avatar
    Phil

    I’m trying the steps listed above. When trying to add a User DSN I get the error “you must first install the current version of the visual foxpro odbc driver”. I have already placed vfpodbc.dll into the c:\windows\SysWOW64 directory. Any ideas how to get this working? Thanks.

  14. Eric Selje Avatar

    Phil, I’m getting that too on this new machine and I’m not sure why. While the post was about getting 32-bit SQL Server drivers running in VFP, not getting a new DSN to the VFP 32-bit driver, I bet someone can help figure out why what you’re trying to do doesn’t work.

  15. Nick Costanza Avatar
    Nick Costanza

    Any idea why my SQL SERVER data is now having data truncated and divided by 1000? It didn’t used to happen with a remote view until I upgraded to Windows 7. I did follow the steps to install the 32 bit ODBC driver.

  16. Eric Avatar

    Nick, it sounds like you’ve got the parameter set to only pull 1,000 records at a time. Depending on where your connection string is set (ODBC, or within VFP’s database itself) you can tweak that to pull unlimited records or set it to X records at a time.

  17. Jerry Maze Avatar
    Jerry Maze

    Thank you, Thank you, Thank you!
    Solved my problem ASAP.

  18. SUSHIL JHABAK Avatar
    SUSHIL JHABAK

    WHICH VERSION OF FOX PRO WILL RUN IN WINDOWS 8.1 VERSION WITH 64 BITS?

  19. Eric Avatar

    Sushil,

    Any of the 32-bit version of VFP should run fine in Windows 8.1 (not the RT version, but the real Windows version). 16-bit versions (DOS, and pre-3.0) would have to be run in VMs.

    Thanks for writing!

    Eric

  20. leeli Avatar
    leeli

    I try this application

  21. Ron Avatar
    Ron

    We have been using VFP 9 (SP1) on Windows 7 for years. The only issue I have had is there is not an Oracle ODBC driver for Windows 7 that will talk to older Oracle databases (we have a 9i database). No problems with newer versions (we have an 11g database as well)

    VFP also works on Windows 10!!

    Regards

  22. Gary Avatar

    Issue within my team….Upgraded server from 2003 to 2012R2. Vendor VFP app pointing to SQL Server database. DO not know all the details but application is no longer working. Again without knowing details I thought immediately 32 bit verse 64 bit. Thoughts? Thanks.

  23. Eric Avatar

    If the client app didn’t change it sounds more like a problem with the ODBC connection itself. Did they install the 32-bit SQL Server 2012 drivers on each workstation?

    https://www.microsoft.com/en-us/download/details.aspx?id=36434

  24. Aun Avatar
    Aun

    Thank you.

  25. Jason Avatar
    Jason

    I am trying to connect foxpro to MS Access and when I set up the ODBC under SysWow64, I get the error “The specified DSN contains an architecture mismatch between the Driver and Application”. Thoughts?

  26. Eric Selje Avatar
    Eric Selje

    Hi Jason,

    I just tried it here and it works ok. At first I was wondering if you have the 64-bit version of Access (Microsoft Office), but I’m not sure that’s even a thing. Anyone else seeing this?

    Eric

  27. Jason Avatar
    Jason

    Eric –

    I am running on a 64 bit operating system with Windows 7 Professional. I had no issues when my PC was 32 bit, however now that I have upgraded, I can no longer connect.

  28. KC Avatar
    KC

    Hi Eric,

    Been encountering this error “The specified DSN contains an architecture mismatch between the Driver and Application” when trying to connect from Oracle using dblink. Configured already the vfp odbc to SysWow64, and the init, listener and tns. Tried to connect via MS Excel from the host and I can access the tables. What should be the issue?

  29. Craig Avatar

    I have spent several days working on connecting a web site hosted in a 2012 server and iis 8.5 to vfp files through the vfp odbc driver and it won’t work. Even with the 32 bit connector. Once you try to make the connection, if fails with the architecture mismatch error. I have read every posting everywhere. Can’t make it work, I have now switched to the Access 2010 redistributable available from Microsoft for free. It works, but there are slight differences especially in blank fields are now Nulls, But this can be dealt with in the web code “where field=” ” worked before, Now I must use “where field is null” Somebody prove me wrong. Please

  30. sbt vision point Avatar

    Any idea why my SQL SERVER data is now having data truncated and divided by 1000? It didn’t used to happen with a remote view until I upgraded to Windows 7. I did follow the steps to install the 32 bit ODBC driver.

  31. Jason Avatar
    Jason

    You are amazing, you are awesomesauce, you are an epic and amazing life saver who has my gratitude!!!

  32. Eric Avatar
    Eric

    Thank you – you saved us MUCH time and efforts! Happy Holidays from our company!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.