We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Jon
Posts: 42
Joined: Tue Jan 14, 2014 4:26 pm

install ODBC mdb DSN fails to install the database path

In the installer, created new data source under ODBC. Set Driver as Microsoft Access Driver. Setup following Attributes:
DBQ - file path of mdb, e.g. [APPDIR]myAccess.mdb
DriverId - 25
FIL - MS Access;

Problem with the installer: from ODBC admin tool, DSN created but Database field where DBQ is stored is blank

Any idea what's missing?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: install ODBC mdb DSN fails to install the database path

Hello Jon,

I'm not sure why you encountered this behavior. Can you please make sure that your System DNS from ODBC admin tool is working?
Can you please tell us what is your target machine software configuration (OS version, SP level) where you can replicate the behavior?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jon
Posts: 42
Joined: Tue Jan 14, 2014 4:26 pm

Re: install ODBC mdb DSN fails to install the database path

I haven't been able to get it to work on any OS. See attached screenshots - one showing ODBC setup in AI and one on the ODBC dialog after running the installer. Notice the Database field on the test DSN is blank. The registry has DBQ created with the correct path though. Tried using import and create new - same results
Attachments
ODBC AdminTool.png
ODBC AdminTool.png (16.12 KiB) Viewed 9759 times
AI_screenshot.png
AI_screenshot.png (10.46 KiB) Viewed 9759 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: install ODBC mdb DSN fails to install the database path

Hi Jon,

It seems that the Microsoft Access driver needs some additional attributes.

So, can you please try to create in the Registry page the structure with all its keys as same as the one which can be found here:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\[DSN name] / Engines

and see if the behavior still persist?

Also, can you please tell us if the connection can be established using the DSN created with Advanced Installer?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jon
Posts: 42
Joined: Tue Jan 14, 2014 4:26 pm

Re: install ODBC mdb DSN fails to install the database path

I've tried different ways to setup the DSN using AI but without success. They include:
1. setup a file DSN and use all the attributes per file DSN - didn't work. In fact, noticed some attributes didn't have the correct type (all were installed as REG_SZ whereas some should be REG_DWORD. But attributes setup in AI did not allow you to specify 'Type'?)
2. setup ODBC using Import machine data source - didn't work
3. create ODBC registry keys and strings per ODBC.INI requirements - Problem: when I run the installer, got permission error - not able to create the registry keys/strings.

The DSN was not created properly using AI. If I manually setup the "Database" field in ODBC Administrator after the installation, then the software works fine. Can this be resolved in AI or I need to look into creating a .net Custom Action to achieve this?
Jon
Posts: 42
Joined: Tue Jan 14, 2014 4:26 pm

Re: install ODBC mdb DSN fails to install the database path

Hi Dan,
I managed to get it working by using ONLY Registry setup. No Data Source setup through ODBC page - it doesn't work for MS Access Driver. I suggest you update the Users Guide with this info or fix AI to handle ODBC setup properly. Thanks for your help!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: install ODBC mdb DSN fails to install the database path

Hello Jon,

After further investigation it seems this is caused by an Advanced Installer limitation, thank you for bringing this to our attention. In the former versions of Advanced Installer we have used the "InstallODBC" Windows Installer standard action to install DSNs.

Starting with the newer version of Advanced Installer, in order to avoid some drawbacks of the above standard action, we have implemented a proprietary ODBC custom action (i.e. AI_OdbcInstall) which is used to install ODBC drivers and DSNs. However, it seems the related behavior (database field is blank) is caused by a limitation of our new "AI_OdbcInstall" custom action. A fix will be added in a future version of Advanced Installer. Until then, as a workaround, in order to avoid this issue you can proceed like this:
- go to "Custom Actions" page and add a "Set installer property" custom action with sequence, scheduled after "Wizard Dialogs Stage -> Searches" and "Install Execution Stage -> Searches" actions group, like this:
  • Property: AI_USE_STD_ODBC_MGR
    Value: 1
- build and run your project

When the "AI_USE_STD_ODBC_MGR" property is set the setup package will use the "InstallODBC" Windows Installer standard action to install DSNs instead of our new "AI_OdbcInstall" custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”