vsamadi
Posts: 9
Joined: Mon Oct 05, 2020 5:35 pm

query result is not stored in property (Version 17.2)

I want to run a query inside advanced installer and use its result in final stages of installation.
The scenario is like this:
In start of setup, using a query I insert a record in log table like this:

Code: Select all

    DECLARE	@return_value int
    DECLARE	@UML_ID int
    EXEC	@return_value = [Common].[UML_Insert_WebServiceInstaller]
    		@UML_ToVersion = '$VERSION$',
    		@UML_UpdateType = 1,
    		@UML_ID = @UML_ID OUTPUT
    
    SELECT @UML_ID AS UML_ID_PROP
Then at the end of installation I should update record given with returned as UML_ID_PROP.

I have defined my query to store its result in `UML_ID_PROP` like this:

Image

And then I want to show the result stored in `UML_ID_PROP` in combobox but it does not show up and its default value is displayed only.
Image

And here is the configuration for property `UML_ID_PROP`.

Image
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: query result is not stored in property (Version 17.2)

Hello,

I think I managed to reproduce this.

Please give me some more time to further investigate this and I'll come back to you as soon as I will have a conclusive answer.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: query result is not stored in property (Version 17.2)

Hello,

Could you please let me know if your SQL Query is executed during the "Install Execution Stage"?

If that is the case, please note that properties that are set during the "Install Execution Stage", i.e. the property that store the result of your query, are not propagated in the "Wizard Dialogs Stage", i.e. on the "ExitDlg" where your control is found.

To avoid such a behavior, please schedule your SQL Query as a custom action without sequence and execute it from a dialog control (e.g. the "Next" button of the "SQLServerConnectionDlg").

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”