rsergeev
Posts: 5
Joined: Mon Mar 18, 2019 1:03 pm

Issue with x64 and odbc driver for Oracle

Hi there!

During the installation of our project we check connectivity to a database. We use odbc connection string to connect to the Oracle database. For testing purposes we use x64 bit OS(see OS.png). We build our binaries as AnyCPU assemblies. On test VM we install x64 bit version of the odbc driver for Oracle. Installer has "Mixed 32/64-bit matching the platform" package type. When I extract msi packages from the .exe installer I see two versions: normal one and .x64(see Extract.png). But installation process is always x86 process and when we check connectivity to a database using custom action we always try to load 32-bit version of the odbc driver and fail, because it is not installed(see ODBC.png). This doesn't happen with PostgreSQL and SQL server as their odbc driver installer contains both x86 and x64 bit version and have the same names for different bitness. As a result we have an error in log "Open connection failed System.Data.Odbc.OdbcException (0x80131937): ERROR Data source name not found and no default driver specified" (see Log.png).
How it is possible to ensure that installer runs as x64 bit process or choose under the hood msiexec x64-bit?
Attachments
ODBC.png
ODBC.png (305.44 KiB) Viewed 901 times
Extract.png
Extract.png (46.49 KiB) Viewed 901 times
OS.png
OS.png (64.86 KiB) Viewed 901 times
rsergeev
Posts: 5
Joined: Mon Mar 18, 2019 1:03 pm

Re: Issue with x64 and odbc driver for Oracle

Forgotten Log.png
Attachments
Log.png
Log.png (138.67 KiB) Viewed 876 times
Catalin
Posts: 7020
Joined: Wed Jun 13, 2018 7:49 am

Re: Issue with x64 and odbc driver for Oracle

Hello,

For Mixed packages, it is important to differentiate your files, especially at build time.

That being said, I would suggest building both 32-bit binaries and 64-bit binaries for your application.

After doing so, when creating a mixed package, make sure to have the 32-bit binaries separated from the 64-bit binaries (when using the wizard, you have an option to select 64-bit binaries and 32-bit binaries).

During the installation, on a 64-bit machine, the 64-bit files should be installed. We can tell the package is also 64-bit because the Program Files folder is used, instead of the Program Files (x86). If the process would have been 32-bit, then the path would have been automatically redirected to Program Files (x86). If it is not, it means the process under the hood (i.e. msiexec) is 64-bit.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”