Windows x64: 32bit Odbc vs 64bit Odbc

Lately I installed a 32bit application on Windows x64.
Well, this application need SQL Server, so I configured DSN ODBC.
I had some problems with ODBC, since Windows x64 has 2 different ODBC panels … which I didnt’ know.
I found usefull info here 64 Bit Installation Concerns.

This is the part that solved my problem, and cleared my minds.

It’s important to understand which kind of DSN you have. On an x64 system, you can create an ODBC connection(DSN) on the 32-bit side of the system or on the 64-bit side of the system.
32-bit applications will only see ODBC connections created in the 32-bit side, and 64-bits applications will only see ODBC connections from the 64-bit side. Each kind of application has is own registry.To setup DSN for 32-bit application you must use:
%WINDIR%\SysWOW64\odbcad32.exe
and for 64-bit application you must use:
%WINDIR%\System32\odbcad32.exe

There is not 32-bit edition of Windows XP on the XP Pro x64 media.

http://support.microsoft.com/kb/942976/en-us

A 64-bit version of the Microsoft Windows operating system includes the following versions of the Microsoft Open Database Connectivity (ODBC) Data Source Administrator tool (Odbcad32.exe):
• The 32-bit version of the Odbcad32.exe file is located in the %systemdrive%WindowsSysWoW64 folder.
• The 64-bit version of the Odbcad32.exe file is located in the %systemdrive%WindowsSystem32 folder.
The Odbcad32.exe file displays the following types of data source names (DSNs):
• System DSNs
• User DSNs

source: 64 Bit Installation Concerns
more info here: The 32-bit version of the ODBC Administrator tool…

Technorati tags: Windows x64, 32bit
About these ads

24 Responses to “Windows x64: 32bit Odbc vs 64bit Odbc”

  1. Chui Tey Says:

    Thanks! That saved me a fair bit of head scratching.

    Incidentally, I noticed that the a User DSN created on 64bit side of ODBC is visible to the 32-bit program, but a System DSN isn’t.

  2. Igor B Says:

    Thanks, mate!!!
    Chui, ive used to use user dsn and start my services under user accounts, im shocked too.

  3. Corbett Says:

    For detailed info on the differences, read the following Microsoft support article:

    http://support.microsoft.com/kb/942976

  4. robertoschiabel Says:

    thank you

  5. Louis Says:

    It is so typical of Microsoft to put the 64 bit drivers in the System32 folder and the 64bit drivers in a folder called SysWOW64. The other issuer I had with ODBC drivers failing to connect was because of the naming convention of the Program Files (x86) folder. Apparently some ODBC drivers like the Microsoft ODBC for oracle driver apparently do not like special characters like parenthesis. I had to uninstall my Office 2007 and reinstall it to a folder in the c:\ directory to get ODBC working in Access.

  6. robertoschiabel Says:

    @Louis:
    System32 contains 64bit version, SysWoW64 32bit version.
    please, have a look here: http://www.microsoft.com/windowsxp/using/64bit/russel_x64faq.mspx, question “What is the SysWOW64 directory?” ;)

    thank you.

  7. Don Morris Says:

    I ran into this same problem. I complied an old VB6 program on an x86 box and needed to run it on a Windows 2008 Server x64. One question is, would there be a problem with unregistering the X64 ODBC for the Database and using the X86(32-bit) ODBC to register it? I did this and it works fine, but would there be any degration in performance for others connecting to the Database on the server and now using the X86 ODBC drivers rather than the X64?

    Thanks!

  8. Larry Says:

    Thank you. What an obvious folder name – SysWOW64 for a 32-bit ODBC control panel.

  9. rstebbens Says:

    Thanks for this, I have two WS2008 servers and was wondering why one DSN works with my 32 bit app and the other doesn’t!

  10. pawan Says:

    thanks i really need it it is very useful

  11. marcusa Says:

    If you have the 64-bit MS Office installed and you wish to use Excel to query one of your 32-bit data sources, how can you browse/choose that 32-bit ODBC?

  12. mick Says:

    I spent whole day trying to figure out why Visio can’t see Oracle ODBC drivers. You just saved my weekend.

    Thanks!

  13. Foot Says:

    What if I am connecting to a 64 bit sql datasource from a 32 bit application?

  14. bharat Says:

    Hi

    I am working with Excel 2007 on a 64-bit OS and trying to access Netezza as the database using the 32-bit Netezza driver. ODBC approach does not work (reasons discussed above ! ).

    Is there a way I can have the OLEDB work (Netezza OLEDB Provider is installed).

    Any help would be great !

    Regards
    Bharat

  15. James Cooper Says:

    DUDE YOUR A BLOODY LIFESAVER THANK YOOOOUUUU!!!!!

    ps sorry for caps but I have so much joy its unreal :D

  16. James Says:

    This worked like a charm! I’m flabbergasted!
    Thanks for a simple tip that did worked!

    Because of it I was able to make a connection to SQL Server 2005 through ODBC and Visual Basic 5.0 RDO on Windows 7 and Server 2008 64-Bit OS’s!

  17. Admin Says:

    You the best. Time saving !

  18. Serg Says:

    Had the same problem. After googling I had solved problem by installing 2007 Office System Driver: Data Connectivity Components from http://www.microsoft.com/download/en/details.aspx?id=23734 . It works with Office 2010 too.

  19. pdb Says:

    and what about dsn-less connection to oracle?
    I have an Access front-end connecting to Oracle through the old Microsoft ODBC for Oracle with a connection string with NO dsn (referring Driver={Microsoft ODBC for Oracle} instead…)

    The frontend works fine with XP/Win7 32bit, don’w work at all with Win7 64bit…

    Any tips/tricks/hints ?
    thx
    pdb

    Now in Italian….
    —————————————
    Caro Roberto,

    grazie per questo post. Sfortunatamente sto sbattendo la testa su un caso piu’ tostop: nbon voglio settare un DSN esplicitamente, per evitare di fare il giro dell’oca su piu’ di 200 postazioni…
    Il mio frontend ACCESS (2003/2007) funziona su winXP/Win7 a 32 bit, non funziona su sistemi operativi a 64bit.

    Probabilmente referenziando il driver direttamente nella connection string (Driver={Microsoft ODBC for Oracle}), le macchine a 64 bit brancolano nel buio…

    Qualcuno ha per caso gia’ trattao la questione?
    Grazie,
    pdb

  20. robertoschiabel Says:

    @pdb
    ciao, sino ad ora non ho incontrato questa situazione.
    oracle non lo incontro da molti anni ormai.
    ho trovato questi link, spero possano fornirti qualche indizio utile.
    http://www.pcreview.co.uk/forums/connection-string-passthrough-query-windows-7-64-bit-t3989592p2.html
    http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4139
    http://stackoverflow.com/questions/6721702/windows-7-64-bit-odbc-drivers-for-ms-access-missing

    mi spiace.

    ENG
    hi, I have not meet Oracle since many years, so I have no info that help you.
    found this urls similar this situation
    http://www.pcreview.co.uk/forums/connection-string-passthrough-query-windows-7-64-bit-t3989592p2.html
    http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4139
    http://stackoverflow.com/questions/6721702/windows-7-64-bit-odbc-drivers-for-ms-access-missing
    .
    HTH
    I’m sorry.

  21. pdb Says:

    @roberto,

    thank you so much – i will give a try.

    IT
    grazie mille per i links, ne ho trovati pure io una montagna…. vediamo di ricondurre l’informatica a qualcosa di logico! :P
    Grazie ancora,
    pdb

  22. Grant Says:

    Thank you so much. You’re a hero!

  23. robertoschiabel Says:

    this is a joke, isn’t it? :D

    thank YOU very much ;)

  24. André Augusto Says:

    Thanks man! You just saved my life :P I was trying to connect to an Access db with pyodbc with no luck. After registering this source I just had to connect using connect(‘DSN=%dbname’)
    Again, thank you!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: