MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Show ODBC/SQL error in static text

Wed Nov 23, 2022 5:08 pm

Hi there,

Currently, I am aware of two options regarding ODBC/SQL errors:
  1. The Connectin and all its scripts are verbose flag in the SQL Connection properties to show errors via popups.
  2. The Log informations to file flag to log the output to a file.
Now I could not find the following, third, option: I want to supress the error popups (use the verbose flag) and instead assign the error message to a property and show that property in the installer using e.g. a static text control. How can I achieve that?

All the best,
Johannes

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

Re: Show ODBC/SQL error in static text

Tue Nov 29, 2022 2:02 pm

Hello Johannes,

I'm afraid that is not possible.

Additionally, I do not see why you would need to display an entire error message on a Static Text control. This may lead to some issues such as, for instance, the text being bigger than the control. In this case, the text will be cut short.

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

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: Show ODBC/SQL error in static text

Tue Nov 29, 2022 5:51 pm

Catalin wrote:
Tue Nov 29, 2022 2:02 pm
Additionally, I do not see why you would need to display an entire error message on a Static Text control. This may lead to some issues such as, for instance, the text being bigger than the control. In this case, the text will be cut short.
Hello Catalin,

We would definitely prefer a more subtle way to display the error messages. And we also don't want no error to be displayed at all. It would be great to have a mechanism that displays the error text in a static text box, and right next to it a button that displays the full error message if needed. This would fix the problem with truncating the text. Is there any way to assign the error message to a property instead of displaying it? Overall it would add a lot of flexibility to error handling if that feature is implemented.

All the best,
Johannes

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: Show ODBC/SQL error in static text

Fri Dec 02, 2022 1:58 pm

Hello Catalin,

One particular reason we need this is the following use case: We load the user's existing ODBC settings and then automatically try to connect. If this succeeds, we skip the ODBC settings dialog. However, if this fails, we show the ODBC settings dialog and there should NOT be shown an error popup, which is very important, because otherwise the user might think that something went wrong during the installation, even though we are simply checking in the background once to see if the current settings already work. Since the user does not actively trigger this action, this could lead to confusion if the error popup is displayed.

All the best,
Johannes

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Show ODBC/SQL error in static text

Fri Dec 02, 2022 3:54 pm

Hello Johannes,

As my colleague said, we do not have support for this.

You can either write the errors to file or display them in a dialog box.

Thank you for your understanding.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: Show ODBC/SQL error in static text

Mon Dec 05, 2022 10:06 am

Liviu wrote:
Fri Dec 02, 2022 3:54 pm
Hello Johannes,

As my colleague said, we do not have support for this.

You can either write the errors to file or display them in a dialog box.

Thank you for your understanding.

Best regards,
Liviu
Hello Liviu,

I hoped for a solution here. I told you our use case and why we need this. This is not helpful unfortunately.

From a programmer's point of view, assigning the error message (which is already displayed in the popup) to a property should only require a few lines of code on your end and would save me a lot of hassle.

Best regards,
Johannes

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Show ODBC/SQL error in static text

Tue Dec 06, 2022 12:36 pm

Hello Johannes,

I understand, but this is currently not possible.

I have added this improvement on our TODO list.

Unfortunately, as for this moment, since you are the only one requesting such feature, it has quite a low priority. However, that can change if more people will request this over the time to come.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”