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!

bdaws5
Posts: 2
Joined: Mon Dec 22, 2014 3:50 pm

Installer continues despite error connecting to datasource

Hi all,

I am trying to create an installer that tests connecting to a datasource before continuing.

However, after following the instructions below, the installer continues despite an error, instead of stopping and rolling back.

http://www.advancedinstaller.com/user-g ... ction.html

I ve attached the project file.

Any advice please would be appreciated.

Thanks.
Attachments
setup.aip
(42.63 KiB) Downloaded 200 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installer continues despite error connecting to datasour

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

This happens because you haven't conditioned the close operation of the current dialog to don't be performed when the test SQl connection fails. In order to do this you should proceed like this:
1. go to "Dialogs" page and select the [Next] button of the "SQLConnectionDlg" dialog
2. on its published events tab select the "Close the current dialog" event and edit its condition like this:

Code: Select all

SqlConnectionOK = "1"
3. rebuild the project and test it again

Let us know if you have any questions.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bdaws5
Posts: 2
Joined: Mon Dec 22, 2014 3:50 pm

Re: Installer continues despite error connecting to datasour

Thanks Daniel, I have implemented this, however, I have to press the [Next] button twice to proceed when the connection succeeds. The action doesn't fire immediately apon clicking this button for the first time.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Installer continues despite error connecting to datasour

Hello,

Indeed, this happens because of the order of the published events added on [Next] button. Can you please move the last two events ("Set installer property value" -> SqlConnectionString and "Execute custom action" -> TestODBCConnection) before the "Close the current dialog" event in list, rebuild your project and test it again?

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

Return to “Building Installers”