Bug #34769 64Bit ODBC-driver does not support 32bit API
Submitted: 22 Feb 2008 21:25 Modified: 27 Feb 2008 21:36
Reporter: Louis Breda van Email Updates:
Status: Unsupported Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:5.x OS:Windows (VISTA64)
Assigned to: CPU Architecture:Any
Tags: 32 bit programm, 64bit

[22 Feb 2008 21:25] Louis Breda van
Description:
Hello,

I have vista64 running here running:
- MySQL 5.1 64 bit
- MsAccess (32 bit of course)
- 32 bit ODBC-driver

The problem is that the 64 bit ODBC-package is not correct IMHO.

Problem is that the 64 bit ODBC-package should provide *both* 
the 32 bit API as well as the 64 bit API.

64 bit ODBC-driver code simply should not imply that it does not support the 32 bit API (as well).

Work arround is to use the 32bit ODBC-driver but, that option is only possible as long as you only need a 32 bit API, since the two ODBC-drivers so not install next to each other.

Sincerely,

Louis   

How to repeat:
Install ODBC64 and try to access it with a 32 bit programm (will not work)
[25 Feb 2008 8:59] Tonci Grgin
Hi Loius and thanks for your report. I must say I disagree. What's next? Support all changes in ODBC specs at once, mix calls from any ODBC spec etc? Btw, there is no x64 piece of commercial SW, that I'm aware of, capable of using x64 ODBC driver on Win x64 platform.

We took different approach, and as you can see, both 32bit and 64bit versions of driver are installed for you to use at your own convenience.

So I fail to see this as a problem but I'm open to your comments.
[25 Feb 2008 17:22] Louis Breda van
hi tonci,

my point is quite simple, there are two aspects:
- 64 bit code
- 64 bit api
For performance reasons I would like to have 64 bit code for the 32 bit api.

Second remark, and I agree hardly 64 bit windows software available by now, is that I case you migh need both 32 bit and 64 bit API, that is not possible since you can not install the 32 bit odbc and the 64 bit odbc driver next to each other.

So my sugestion is that the 64 bit code should support both the 32bit and the 64 bit API. My expirence is that that is not the case.

Sincerely,

Louis
[25 Feb 2008 17:22] Louis Breda van
hi tonci,

my point is quite simple, there are two aspects:
- 64 bit code
- 64 bit api
For performance reasons I would like to have 64 bit code for the 32 bit api.

Second remark, and I agree hardly 64 bit windows software available by now, is that I case you migh need both 32 bit and 64 bit API, that is not possible since you can not install the 32 bit odbc and the 64 bit odbc driver next to each other.

So my sugestion is that the 64 bit code should support both the 32bit and the 64 bit API. My expirence is that that is not the case.

Sincerely,

Louis
[26 Feb 2008 11:03] Tonci Grgin
Louis, I consulted several devs regarding this and we all fail to see the problem...

> ... that is not possible since you can not install the 32 bit odbc and the 64 bit odbc driver next to each other...

Not true, new installer does exactly this, when on Winx64 install (and register) both 32 and 64bit driver versions.
[26 Feb 2008 14:39] Louis Breda van
Tonci,

I did some testing and must partly agree with you.

I did remove the ODBC-drivers and rebooted the system. After that I reinstalled the 64 bit 5.1 ODBC package.

Tried to connect the ODBC DB from msaccess using the GUI in order to create a table link. ==> does not work

That I wrote a small pease of VBA code to test if I could access mysql server in that way. Must admit that works :)

That I did install 3.1 odbc 32bit driver next to the 5.1 64 bit driver.
Using that driver, I can access MySQL from the GUI / I can create a tabel link.

So reality is something in between:
- it works as you say when using VBA
- but it does *not* work when jou try to create a table link 

Sincerely

Louis
[27 Feb 2008 14:23] Tonci Grgin
Louis, let me summarize:
> So reality is something in between:
 - it works as you say when using VBA
 - but it does *not* work when jou try to create a table link 

1) During install procedure on Winx64 *both* 64 and 32bit drivers are installed. This is intended behavior.
2) 3rd party SW like Office etc are mostly 32bit thus you need to use 32bit ODBC driver manager (!) to add DSN's for them
3) There is no default OLEDB provider (MSDASQL) on Win x64 for now so many things will not work (like vbs ...)

Now, you would like to report that DSN created with 32bit DM (odbcad) on Winx64 can not link tables in Access right? If so, please open new bug report for this so I can test. But, be sure you added DSN with 32bit odbcad, not the default (64bit) one from Administrative tools!
[27 Feb 2008 21:36] Louis Breda van
Tonci,

Since we understand the real problem better now, you can close this one. 
I opened a new one under number #34908

Sincerely,

Louis
[28 Feb 2008 7:35] Tonci Grgin
Ok Louis.

Thanks for your interest in MySQL.
[23 Oct 2008 16:34] Chris Longley
I agree with Louis, I spent ages fruitlessly trying to configure this
[25 Nov 2008 4:52] Christopher Slee
From a post by Pascal Deliot:

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
[29 Jul 2012 13:38] Anna Pham
Thank you Mr. Slee so much for your solution on How to setup MySQL ODBC driver for 32-bit on 64-bit Windows: "%WINDIR%\SysWOW64\odbcad32.exe"
And if you need MySQL ODBC driver for 64-bit, you can install it also and use the following "%WINDIR%\System32\odbcad32.exe"