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!

MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

ODBC Validation without database name specified

Hi,

I have an installer that uses the SQL Server connection dialog.

I have used the functionality as you have provided it. I think I may have changed variable names, but not any functionality of the dialog.
(the project is attached)

The dialog has a "Click here to test SQL connection" hyper link.

I believe there is a bug : When I am testing, the dialog appears to successfully validate the connection
using a trusted connection, EVEN THOUGH the database name is empty???

( I have not tested using a sql connection - but I assume it would do the same? )
ODBC_DialogConnectionTest_WithoutDB_specified.PNG
ODBC_DialogConnectionTest_WithoutDB_specified.PNG (143.26 KiB) Viewed 3345 times
Attachments
ManagerServiceInstaller.zip
(508.06 KiB) Downloaded 233 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: ODBC Validation without database name specified

Hi Mike,

The "Database" is, by default, not specified in the SQL connection string used to test the connection due to the "Create database if it does not exist" option that is checked in the "SQL Databases" page.

If that option is checked, we consider that the connection will succeed during the installation because even if the database does not exist, it will be created automatically. So, basically, the test connection action only tests the connection to the server, not also to the database.

If you want to test the connection to the database, you can select the "Click here to test SQL connection" hyperlink, then modify the value of its "[SqlConnectionString]" published event as in the example below:

Code: Select all

Driver=[\{]SQL Server[\}];Server=[SERVER_PROP];Database=[DATABASE_PROP];Uid=[USERNAME_PROP];Pwd=[PASSWORD_PROP];
Just let me know if you have other questions.

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: ODBC Validation without database name specified

You're welcome Mike.

Just let me know if there is anything else that I can help you with.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”