Kai
Posts: 7
Joined: Fri Oct 02, 2020 10:02 am

Check SQL privileges on database connection dialog

In our setup we have a dialog to configure the database connection, either to connect to an existing database, or to create a new one.

If the SQL user provided doesn't have enought rights to do so, the setup fails at the installation step with an appropriate error message.

Is it possible to move that check to database connection dialog, so that the user knows as soon as possible, and doesn't have to click through all the following screens?
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: Check SQL privileges on database connection dialog

Hello,

The "check" whether the user has enough privileges to create/modify a database or not is done at install time, i.e. the setup tries to create the database --> it fails --> the error is thrown.

With that being said, I'm afraid there isn't much that can be done before installing to see whether the user has or does not have the privileges to access the database.

The closest I can think of what you want to achieve is, before installing, you can try to add a "Test SQL Connection" operation to your dialog. This feature enables the user to test if the ODBC connection works.

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

Return to “Building Installers”