1

I have written a C# WPF desktop application using ODBC connections via connection strings (no user DSN) like:

 Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=D:\Data\example\test.accdb;

There are several ODBC drivers (all 32 bit) in use so far, as the application is used in a Windows 7 32 bit environment.

I have now compiled the application in "Any CPU" mode to be able to address 64 bit drivers in 64 bit environments. Just to keep being able to use 32 bit drivers I compiled a second version in "x86" mode, which can be used in 64 bit environments to address 32 bit ODBC drivers.

Is it possible to support 32/64 Bit ODBC drivers in 64 bit environments without having two versions (x86 and x64/Any CPU). My goal is to compile only an "Any CPU" version. Is there a method to force the application at runtime (dynamically) to run in 32 bit / 64 bit mode by c# code or by standard windows scripting?

Corflags does not seem a solution as it is not available in target environments at customer site...

BiBaBu
  • 11
  • 5
  • Does this desktop application ever use more than 4GB of memory, or do extensive 64 bit numerical processing? – Robert Harvey Jun 05 '18 at 14:46
  • Yes.. the application is used to compare, merge and extract data structures of many files with use of in-memory datasets... It would be great to be able to use all available RAM to handle big amounts of data... especially if MSSQL / Oracle databases are involved. – BiBaBu Jun 05 '18 at 15:01

0 Answers0