PDA

View Full Version : How to create a 64-bit ODBC entry?



IlkkaV
10-22-2014, 05:58 AM
I'm having issues with creating an ODBC entry that's visible for 64-bit applications. The entries I create always go to the 32-bit version (C:\Windows\SysWOW64\odbcad32.exe) instead of the 64-bit one (C:\Windows\System32\odbcad32.exe) and because of that the created ODBC DSN is not visible for the DB list in our 64-bit configuration utility. I've tried the following:

-Change template summary of the whole project from Intel to x64 (we have both x86 and x64 releases defined in the same project)
-Associate the ODBC DSN entry with a component that's included only in the x64 release
-Move the component for the ODBC DSN entry from the default x86 installdir to the root folder for 64-bit components (which is made the installdir using a custom action in a 64-bit version) and marked the component as 64-bit

Am I missing something here? Should I give some additional parameters to the DSN entry?

Cary R
10-22-2014, 11:12 AM
I'm having issues with creating an ODBC entry that's visible for 64-bit applications. The entries I create always go to the 32-bit version (C:\Windows\SysWOW64\odbcad32.exe) instead of the 64-bit one (C:\Windows\System32\odbcad32.exe) and because of that the created ODBC DSN is not visible for the DB list in our 64-bit configuration utility. I've tried the following:

-Change template summary of the whole project from Intel to x64 (we have both x86 and x64 releases defined in the same project)
-Associate the ODBC DSN entry with a component that's included only in the x64 release
-Move the component for the ODBC DSN entry from the default x86 installdir to the root folder for 64-bit components (which is made the installdir using a custom action in a 64-bit version) and marked the component as 64-bit

Am I missing something here? Should I give some additional parameters to the DSN entry?

I can see myself in the near future needing to do this exact task, so I just gave this a quick try with the following steps:

1. Created a new project
2. Set TemplateSummary to x64;1033
3. Imported a DSN from the ODBC Resources view in InstallShield
4. Went to Components view and marked the newly created component as 64 bit
5. Installed

It successfully created it as a 64 bit System DSN.

So, based on your steps listed, it should work. Maybe the logfile will show something going wrong during the InstallODBC action? I would also recommend a sanity check by viewing the package in Direct Edit mode to make sure everything looks like it should, since Release flags are involved.

IlkkaV
10-22-2014, 12:22 PM
I can see myself in the near future needing to do this exact task, so I just gave this a quick try with the following steps:

1. Created a new project
2. Set TemplateSummary to x64;1033
3. Imported a DSN from the ODBC Resources view in InstallShield
4. Went to Components view and marked the newly created component as 64 bit
5. Installed

It successfully created it as a 64 bit System DSN.

So, based on your steps listed, it should work. Maybe the logfile will show something going wrong during the InstallODBC action? I would also recommend a sanity check by viewing the package in Direct Edit mode to make sure everything looks like it should, since Release flags are involved.

Thanks for trying it out. It's good to know that the functionality works properly and I just need to check what bit is still wrong in my project. I also created my data source from scratch in InstallShield, so I'll try importing an existing functional DSN and see what part I was missing in my manual configuration.

IlkkaV
10-23-2014, 01:12 AM
So much for the importing idea as I can't seem to locate any option or tool for doing so. Is it just the lack of coffee or isn't there an option for that? All I can do is create a new DSN and configure it from scratch.

IlkkaV
10-23-2014, 04:02 AM
Problem solved. It was indeed settings, particularly this part: "4. Went to Components view and marked the newly created component as 64 bit".

I thought I had done exactly that, but a closer review revealed that I had accidentally moved the 32-bit version to the 64-bit folder and marked that as 64-bit. The component for the DSN I wanted to make was still marked as 32-bit and it's not that much of a surprise that it did indeed install 32-bit DSN in that case. Now that the components are in their correct locations and have the correct settings, the data source is just fine. Thanks Cary R for your help.