wxDb for 32-bit OS vs 64-bit OS Topic is solved

In this forum you can discuss database related issues which can be wxWidgets related, but also generic in nature.
Post Reply
bli88
In need of some credit
In need of some credit
Posts: 5
Joined: Thu May 23, 2019 6:20 pm

wxDb for 32-bit OS vs 64-bit OS

Post by bli88 »

Hi there,
We have an application using wxWidgets/wxDb to access the SQL Server database through ODBC data source on a 32-bit platform. After moving to 64-bit OS, the same application is not working anymore as the call wxDbGetDataSource() and wxDbGetConnection() do not return anything. What could be the problem? Thanks for your helps in advance!
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDb for 32-bit OS vs 64-bit OS

Post by doublemax »

Are you using a very old wxWidgets version by any chance? AFAIR one of the reasons the integrated ODBC support in wxWidgets was dropped, was because it was not 64bit compatible and there was nobody who could maintain the code.

You should look into wxDatabase:
https://github.com/mtangoo/wxDatabase
Use the source, Luke!
bli88
In need of some credit
In need of some credit
Posts: 5
Joined: Thu May 23, 2019 6:20 pm

Re: wxDb for 32-bit OS vs 64-bit OS

Post by bli88 »

Yes, it's a pretty old version - 2.6.2.
So, we cannot use this method anymore on the 64-bit OS?
Thanks for you reply!
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDb for 32-bit OS vs 64-bit OS

Post by doublemax »

So, we cannot use this method anymore on the 64-bit OS?
I'm not 100% sure, i just had a faint memory that 64bit compatibility was one of the problems with the old ODBC support.

But if i understand you correctly, you just changed the OS, you didn't compile the app for 64bit? Usually i would expect this to work, but i have no idea what the problem could be. Is it possible that only a 64bit ODBC driver is installed on the system?
Use the source, Luke!
bli88
In need of some credit
In need of some credit
Posts: 5
Joined: Thu May 23, 2019 6:20 pm

Re: wxDb for 32-bit OS vs 64-bit OS

Post by bli88 »

Yes, we changed the 64-bit ODBC driver, but did not recompile the app for 64-bit. The installation of the app worked without problem and everything else worked as well. Only when trying to access the DB it's not working.
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxDb for 32-bit OS vs 64-bit OS

Post by doublemax »

Is there also a 32bit ODBC driver installed? You probably need that to access it from a 32bit application.
Use the source, Luke!
bli88
In need of some credit
In need of some credit
Posts: 5
Joined: Thu May 23, 2019 6:20 pm

Re: wxDb for 32-bit OS vs 64-bit OS

Post by bli88 »

Thanks again for your very good suggestion! I'll try it out tomorrow.
bli88
In need of some credit
In need of some credit
Posts: 5
Joined: Thu May 23, 2019 6:20 pm

Re: wxDb for 32-bit OS vs 64-bit OS

Post by bli88 »

Thanks to @doublemax! Using the 32-bit ODBC Data Source Administrator, I was able to make it working without having to make any code changes.
Post Reply