Test SqlConnection MSSQL - Advanced Installer Community
johnMinelli
Posts: 3
Joined: Fri Aug 14, 2020 11:08 am

Test SqlConnection MSSQL

Hi i'm trying to make an installer that create a new sql instance and than create a with an SQL script the database in it.
I succesfully be able to create the instance with a batch file executed as a feature based prerequisite and in the custom action after "PublishFeatures" i created my action with the sql script attached.
The problem that i have is with connection to the database to execute the script.
Having this situation: MS SQL Server - ODBC Driver - ODBC Driver 17 for SQL Server
Image
i both tried with a custom ODBC driver that is just "APPDIR\msodbcsql17.dll" file but the connection always fail and also the local "ODBC Driver 17 for SQL Server" and the generic "SQL Server" with the same results.
To test it (i'm testing in the UI of the program) i used a newly created local database comparing simple query execution (with the intent to check the connection) with SQL Management Studio. In SQLMGMS the connection works (Trusted conn and Uid:sa) but with AdvancedInstaller works only the Trusted conn while trying to connect as 'sa' with password the request remains pending.

Also, I wanted to point out two issue (i suppose):
- When the request is pending: if i don't touch anything the windows ends itself with the messagebox "ODBC connection: timout exceded" otherwise if i click the window the ODBC dialog enter the not responding phase and then the result window shows up empty with no result.

-I'm wondering if the "Test" button works both selecting the "DlgPredefinedConnection" item as in the image or only selecting the query as i can certify happens in my env. If so would be great if you disable in the first case.

W10, AI Version 17.2 (3F88558F)
Last edited by johnMinelli on Fri Aug 14, 2020 4:31 pm, edited 1 time in total.
johnMinelli
Posts: 3
Joined: Fri Aug 14, 2020 11:08 am

Re: Test SqlConnection MSSQL

My tests continued:
I tried to update the program to 17.3 with no results (and switched back to 17.2).
I confirm that with "SQL Operations">"SQL Test Connection" aka the connection test done by dialog i've no problem.
Also i tried to attach my query to a custom action at the begin of the installation just to try if the error is in the "Test" button but it doesn't work anyway.
I visited the "Sql Console Configuration Manager" for some luck maybe enabling TCP/IP or using a custom port bot none worked..
In short: every time I obtain an ODBC connection timeout (or a blank result page if i interact, as i said)
johnMinelli
Posts: 3
Joined: Fri Aug 14, 2020 11:08 am

Re: Test SqlConnection MSSQL

... restarted the pc, now it works.... that's madness
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Test SqlConnection MSSQL

Hello John and welcome to Advanced Installer forums,

First of all, please accept my apologies for the delayed reply.

Thank you for your followup on this.

I am glad everything works as expected now.

Please let us know if you encounter any further issues and we will gladly assist.

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

Return to “Common Problems”