antidotcb
Posts: 34
Joined: Mon May 17, 2010 8:10 am

Testing SQL Connection

Hi there.

I'm trying to validate information users enter on dialog.
This information is login & password to SQL server.
I use TestODBCConnection (TestSqlConnection from <AI_CUSTACTS>sql.dll).
I don't want to see any error messages, but independant from value which I set into property "SqlSuppressSpawnMsgBox" , the internal ODBC error messages are always shown.

What I'm doing wrong? I want to get rid of any error messages that could be shown during TestSqlConnection...
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Testing SQL Connection

Hello,

Please keep in mind that when "SqlSuppressSpawnMsgBox" property is set to 1, then only the following spawn message box, which is shown when the "Test ODBC Connection" custom action runs, is suppressed:
  • "Please wait while testing the connection..."
and not the ODBC error messages.
I want to get rid of any error messages that could be shown during TestSqlConnection...
Can you please tell us why do you want to suppress the ODBC error messages during "Test ODBC Connection" custom action? The ODBC error messages are very useful to inform the user if the related connection parameters are correct or not. Why would you want to test the SQL connection if you don't want to inform the user if the connection parameters are correct or not?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
antidotcb
Posts: 34
Joined: Mon May 17, 2010 8:10 am

Re: Testing SQL Connection

Of course, they are useful.
But they are formatted somewhat not stylish. It would be great to get possibility to provide format string for these messages, or get error string w/o message box displayed.

Anyway, possibility to disable them - is another level of installation process customization.
And it would be much more appreciated that these messages are written into error log, instead of displaying message box.
Bogdan
Posts: 2794
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Testing SQL Connection

Thank you for your suggestion, I've added it on our TODO list, so we can analyze it properly for a future version of Advanced Installer.

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Testing SQL Connection

Hello,

The possibility to write error in a log file has been added in version 11.0 of Advanced Installer released on March 13th, 2014.

If you enable the Log errors to file option from the Predefined SQL Connection properties, all errors encountered will be written in a log file in the %temp% folder named AI_SQLScripts.log.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”