Getting server name from dialog - Advanced Installer Community
Cidolfus
Posts: 4
Joined: Mon May 26, 2014 4:13 am

Getting server name from dialog

I'm trying to run an SQL script on an SQL instance during the installation phase.

In the Predefined condition settings page, everything works fine (i'm able to complete the installation) if I were to hardcode the server like this:
Image

However, when I use [SERVER_PROP] as the Server, I get this error "ODBC Connect: timeout exceeded" during installation even though I select the exact same server from the combobox during installation.

Where did I go wrong?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Getting server name from dialog

Hi and welcome to Advanced Installer forums.

I'm not sure why you encounter this behavior. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Getting server name from dialog

Hi,

I looked over the files that you sent, but it seems that the [SERVER_PROP] property that you use in the "Server" field is not set anywhere in your project, so it is empty during the installation.

Can you go in the "Dialogs" page, select the "Next" button of the "SQLConnectionDlg" dialog and create a new published event that sets the [SERVER_PROP] property to the value of the chosen server and see if the installations work? Your event should be configured as described below:
  • Property: [SERVER_PROP]
    Argument: [SqlServerBrowseComboBox]
    Condition: 1
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Cidolfus
Posts: 4
Joined: Mon May 26, 2014 4:13 am

Re: Getting server name from dialog

Hi Eusebiu,

I have added a new published event (set installer property value) like this:

Image
Image

However, I still get the same timeout message.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Getting server name from dialog

Hi,

The published event that you created is correct, but I'm not sure why you get the same error. Are you sure that the value of the "Server" combobox is "BLACKBOX\SQLSERVER2014" when you select it and it is not "SQLSERVER2014"?

Does it work if you replace the "[SqlServerBrowseComboBox]" argument from the published event with the "BLACKBOX\SQLSERVER2014" value?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Cidolfus
Posts: 4
Joined: Mon May 26, 2014 4:13 am

Re: Getting server name from dialog

I get the same error message even when I hardcode "BLACKBOX\SQLSERVER2014"
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Getting server name from dialog

Hi,

Investigating more deeply your project, I found that in the "Server" field there is a SPACE (' ') added after the [SERVER_PROP] property and that seems to cause the problem. Can you remove that space and see if the installation works?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Cidolfus
Posts: 4
Joined: Mon May 26, 2014 4:13 am

Re: Getting server name from dialog

Yes you are right, removing the space solved the issue. Wow didn't know that it was that sensitive.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Getting server name from dialog

I'm glad it worked by removing that space. We will make an improvement in the future to trim the value from that field, so this problem will not be encountered anymore.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Getting server name from dialog

Hello,

This improvement has been added in version 11.5 of Advanced Installer released on September 25th, 2014.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”