sjblack@gmail.com
Posts: 36
Joined: Mon May 23, 2011 11:50 am

Testing Sql Connection failing

I have a custom dialog configuring a Database connection string until a recent update this worked fine and errors resulted in a popup dialog.

After the update to 17.2 nothing is happening at all, the return property is not even being set.

I tried replacing the custom action with a new one as there seems to be a newer mechanism for doing it. Now the return property is being set but I am not getting any error dialog if the connection fails.

Any suggestions?
sjblack@gmail.com
Posts: 36
Joined: Mon May 23, 2011 11:50 am

Re: Testing Sql Connection failing

Just to follow up I downgraded to 17.0 and the SQL connection test works fine. Seems to be the jump to 17.2 that caused the problem.
sjblack@gmail.com
Posts: 36
Joined: Mon May 23, 2011 11:50 am

Re: Testing Sql Connection failing

Furthermore 17.1.2 seems fine so 17.2 it is.

Any suggestions for a workaround or timescale on a potential fix?
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Testing Sql Connection failing

Hello,

You are indeed, right. We have done some changes recently to our support for the "Test SQL Connection" custom action.

In order for me to further investigate this, could you please forward me a test-case which I can follow in order to reproduce this?

Additionally, could you please let me know if you are using our predefined "SQLServerConnectionDlg"?

Looking forward to hearing from you!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjblack@gmail.com
Posts: 36
Joined: Mon May 23, 2011 11:50 am

Re: Testing Sql Connection failing

Using pre 17.2 version of AI:

1. Create a custom dialog.
2. Follow the AI help guide to add a test sql connection CA on the Next button.
3. Upgrade to 17.2 and build.
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Testing Sql Connection failing

Hello,

I have tested this scenario and everything worked as expected for me.

Here is how I've tested:

- created a project in Advanced Installer 17.0

- I have added the TestSqlConnection custom action to the "SqlConnectionDlg"

- build and ran the setup --> everything worked as expected

- opened the project in Advanced Installer 17.2 and rebuilt the project

- retested the setup and once again everything worked as expected

With that being said, could you please give me some more details about what exactly is failing. For instance, do you receive any error messages?

Additionally, if you could forward me a sample project (it does not have to contain any files) that reproduces this, that would be even better.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ian Walker
Posts: 4
Joined: Thu Jul 30, 2020 6:38 pm

Re: Testing Sql Connection failing

Hi Catalin,
I'm replying on behalf of sjblack@gmail.com, who is a colleague of mine. I have attached a zip file containing two sample projects that demonstrate the issue as follows:

1. Sample.17.0.aip - Created in AI v17.0. If you build the project in AI v17.0 and run the MSI you'll see the working/expected behaviour on the SQLConnectionDlg's Next button (if the connection succeeds the next dialog is presented, otherwise the ODBC testing connection/error popup is displayed).

2. Sample.17.2.aip - A clone of Sample.17.0.aip that has been opened and re-saved in AI v17.2. If you build the project in AI v17.2 and run the MSI you'll see the broken behaviour on the SQLConnectionDlg's Next button (nothing happens on the button click regardless of whether or not the connection fails - the screen is stuck).

Points to note:
-The projects are empty except for small customisation to the out-of-the-box SqlConnectionDlg to the fields and field layout. For example, a radio group is added to set a SQLTRUSTEDCONNECTION property to 1 or 0.
-The project has an install parameter ODBC_DRIVER with its value set to 'SQL Server Native Client 11.0'.
-The ODBC_DRIVER property is referenced within the SqlConnectionDlg's Next button published event argument for [SQLConnectionString]. E.g: Driver={[ODBC_DRIVER]};...
-There is a TestODBCConnection custom action that is set to execute on the SqlConnectionDlg's Next button published event.

In addition, I've also tested by creating a 'SQL Databases' - 'Database Server' - 'Predefined Connection' using each of the following ODBC drivers (both 32 and 64 bit) available:
-SQL Server
-SQL Server Native Client 11.0
-ODBC Driver 13 for SQL Server
-ODBC Driver 17 for SQL Server.

Using the right-click 'Test' option on the predefined connection could successfully establish a connection to my database for each ODBC driver in AI v17.0, whereas they all failed to connect without any specific error messages in AI v17.2.

Thanks for your help,
Ian
Attachments
Sample.zip
(7.45 KiB) Downloaded 358 times
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Testing Sql Connection failing

Hello Ian and welcome to our forums,

First of all, thank you very much for the detailed test-case and for the provided resources.

I have tested this and I was indeed able to replicate the behavior.

I have forwarded this to our development team with the maximum severity and hopefully this will be fixed in a future version of Advanced Installer.

Unfortunately, until then, I am afraid I was not able to find any workaround for this other than using an older version of Advanced Installer.

I will update this thread as soon as this will be fixed.

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

Re: Testing Sql Connection failing

Hello Ian,

As a followup to my last thread:

I have done some further investigations and I may have found a workaround for this.

Could you please proceed as it follows:

1. go to "Dialogs" page --> your dialog --> remove the "Execute custom action" event that executes the "TestODBCConnection" custom action

2. now please go to "Custom Actions" page and delete the custom action

3. go to "SQL Databases" page and add a new "Test SQL Connection" there

newConnection.png
newConnection.png (206.21 KiB) Viewed 13070 times

4. go to "Custom Actions" page --> right click on the custom action --> "Sequence" --> "Without Sequence"

5. now please go back to "Dialogs" page --> readd the event that executes the custom action

For your reference, I have also attached the modified project in which the "fix" is included. Please find it below:
Sample17.0.aip
(19.68 KiB) Downloaded 341 times
(The project was opened and modified using Advanced Installer 17.3)

Hope this will help.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ian Walker
Posts: 4
Joined: Thu Jul 30, 2020 6:38 pm

Re: Testing Sql Connection failing

Hi Catalin,

thank you for your reply. I can confirm that your work around does allow the installer dialog to progress on 'Next' button click if the connection string is valid. I did see some slightly different behaviour if the connection string is invalid though (I can provide more details on that later if necessary).

Are you able to confirm if or when the issue will be fixed in a future version of AI for our original project file settings in order to be backwards compatible?

Thanks very much,
Ian
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Testing Sql Connection failing

Hello Ian,

You are always welcome!

I am glad the workaround helped.
Are you able to confirm if or when the issue will be fixed in a future version of AI for our original project file settings in order to be backwards compatible?
Unfortunately, I can not give an estimation on this. As I can see in our reporting tool, the developer is already working on this. Best case scenario would be for this to be fixed in the next release of Advanced Installer.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
a.guelle
Posts: 97
Joined: Tue May 19, 2015 2:23 pm

Re: Testing Sql Connection failing

Hi Everyone,

I see the same behaviour on 17.3. I even see that there is no TestODBCConnection action any more to pick from the "Add Custom Action" dialog. As we just upated to have another issue fixed, this stopps our complete deployment chain.

Best regards,

Angelo
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Testing Sql Connection failing

Hi Angelo,

Starting with the latest Advanced Installer versions you should add a Test SQL Connection Operation from "SQL Databases" page instead of directly adding the Test ODBC custom action in "Custom Actions" page.

If you have any questions or doubts just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Testing Sql Connection failing

Hello Ian,
Hi Catalin,

thank you for your reply. I can confirm that your work around does allow the installer dialog to progress on 'Next' button click if the connection string is valid. I did see some slightly different behaviour if the connection string is invalid though (I can provide more details on that later if necessary).

Are you able to confirm if or when the issue will be fixed in a future version of AI for our original project file settings in order to be backwards compatible?

Thanks very much,
Ian
This issue has been fixed in Advanced Installer 17.4, released on August 26th, 2020.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Ian Walker
Posts: 4
Joined: Thu Jul 30, 2020 6:38 pm

Re: Testing Sql Connection failing

Hi Catalin,

thanks very much for the update - we've tested it and it's working. We're now upgrading to 17.4 and will let you know if we see any further issues.

Thanks again,
Ian

Return to “Common Problems”