4

I want a 32bit bit application (running on Windows 7 64bit) to connect to MySQL 5 64bit through ODBC.

Does the MySQL ODBC connector have to be 32 or 64 bit?

Does the MySQL ODBC connector's register size have to match the application's or MySQL's? Windows 7 64bit can handle 32bit as well as 64bit connectors - so this does not matter.

Tomas
  • 57,621
  • 49
  • 238
  • 373
Raffael
  • 19,547
  • 15
  • 82
  • 160

2 Answers2

3

(verified with R 32bit and 64bit / Windows 7 64bit / MySQL 5 32bit.)

Only the application's architecture (32bit or 64bit) that connects via the ODBC adapter does matter and has to be matched by it.

Windows 7 64bit can handle both 32bit and 64bit ODBC connectors (different data source managers though)

To MySQL 5 32bit you can connect with a 32bit as well as with a 64bit ODBC connector.

Raffael
  • 19,547
  • 15
  • 82
  • 160
  • +1 but how do I know whether the application is 32 or 64 bit? I'm using MS Access 2003 on Windows 7 64 bit. THere is nothing about # of bits in the "About" section of MS Access. – Tomas Jan 22 '13 at 12:55
  • 1
    MS Access 2003 is only 32-bit. 64-bit versions of the Office programs didn't come until 2010. – alldayremix May 08 '13 at 19:15
2

You cannot link a 32 bit application to a 64 bit ODBC driver so you have no choice if your app is 32 bit. Whether the 32 bit ODBC driver talks to the 64 bit mysql is another

bohica
  • 5,932
  • 3
  • 23
  • 28
  • that means the ODBC connector's register span has to match the connecting application's!? – Raffael Dec 07 '12 at 09:33
  • I've no idea what you mean by "register span". It is simply that an ODBC driver is a shared library or DLL and you cannot load a 64 bit shared library or DLL into a 32 bit application and vice versa. – bohica Dec 07 '12 at 10:45
  • 32bit and 64bit are referring to the used register size / span used when processing data in your computer ... also in Windows 7 64bit for example an ODBC connector has to be registered as a data source and is then made available to an application by Windows. So I am not sure if it is totally evident that the your connector's bits have to match your connecting application's. – Raffael Dec 07 '12 at 10:48
  • Your confusing something really simple. It does not matter that you can add 32 bit DSNs and 64bit DSNs. You cannot mix 32 bit code with 64 bit code. If you have a 32 bit application you will need to add a 32 bit ODBC driver and possibly (if you want DSNs a 32 bit DSN as well). – bohica Dec 07 '12 at 15:16
  • well ... I would love to flag your post as an answer. but you are just writing about what "cannot" be linked and "no choice if" and "whether or not". If you could just answer my question in a "positive" and straight forward manner - that would be awesome! – Raffael Dec 07 '12 at 17:31
  • I've yet to come across a 32 bit ODBC driver that cannot talk to a 64 bit database engine but I have to admit I've not tried it with MySQL. Usually the network protocol is architecture neutral. Your not overloaded with answers - by now you could have actually tried it yourself. Whether you flag my answer as an answer is your choice. – bohica Dec 07 '12 at 17:58
  • well, so far I made all ODBC connectors work. With R, PowerPivot. I was just not sure why choosing a 32bit connector was always the right decision. – Raffael Dec 07 '12 at 18:47