Suppressing SQL server discovery when using BACK button - Advanced Installer Community

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!

jjones
Posts: 68
Joined: Wed Jun 29, 2011 3:30 pm

Suppressing SQL server discovery when using BACK button

I am new to AdvancedInstaller but not new to installers (used several versions of InstallShield but it is just too expensive now). The current project I am working on requires the installation of a database so I am using the tools you provide to discover SQL servers and the associated databases. Is there a way to suppress the function that does the SQL server and database discovery if the user is using the BACK button?

Thanks!
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Suppressing SQL server discovery when using BACK button

Hello and welcome to the Advanced Installer Forums,

Thank you for your interest in Advanced Installer.
Is there a way to suppress the function that does the SQL server and database discovery if the user is using the BACK button?
If by this you mean to hide the dialog on which you implemented the functionality from the following tutorials:
http://www.advancedinstaller.com/user-g ... bases.html
http://www.advancedinstaller.com/user-g ... rvers.html
then you can use the "Show only if..." feature from the context menu of that dialog.
For example, you can condition the dialog with a public property that is set on the "Next" button of that dialog. This way if the user clicks "Back" on the next dialog and the condition is not met, the dialog will not be shown.

If this is not what what you mean, please give us more details, exemplify the issue and we will gladly assist you further.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jjones
Posts: 68
Joined: Wed Jun 29, 2011 3:30 pm

Re: Suppressing SQL server discovery when using BACK button

Thank you for your response! What I mean is that when you click FORWARD through the install, the user is given the option to use an existing SQL database or install SQL Express 2008 R2. If they opt to use an existing database, they select the proper radio button and click NEXT. At this point, the BrowseSQLServer function runs and returns the server list to a combo box. The user selects a server, inputs a username and password, then clicks the NEXT button. Again, the user has to wait while the BrowseDatabaseTable function runs and returns the tables it finds using the credentials supplied. However, at this point, if the user realizes "Uh oh! I selected the wrong SQL server" they need to hit the BACK button.

Is it possible to suppress the function BrowseSQLServer so if you do have to go back to select a different SQL server it won't run the function again but just use the values it had from the last time?

Thanks!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Suppressing SQL server discovery when using BACK button

Hi,

You can try this approach:
- in Install Parameters page create a custom property, for example BROWSE_SQL_SERVERS, and set it's default value to "true"
- on the Back button of the databases dialog use a SetProperty published control event to set the property "false"
- on the Back button of the servers dialog use another control event to set the same property to "true"
- use this property to condition the DoAction init control event on the servers dialog:

Code: Select all

BROWSE_SQL_SERVERS = "true"
This way the servers are discovered only when BROWSE_SQL_SERVERS is set to true. Pressing Back on databases dialog disables server browsing. Pressing Back on servers dialog enables it again.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”