cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mike2003
Level 3

Suppressing SQL connection error messages in Installscript MSI project

In my InstallScript MSI project I am trying to test whether a SQL Server can be connected to using the SQLRTTestConnection2 function. However, if there is a problem with the connection then an error message is displayed by IS which I don't want to happen as I want to handle it myself.

I have tried setting the MSI property IS_SQLSERVER_CA_SILENT to 1 but this has not made any difference (does this only work for Basic MSI projects?).

Is there any way to suppress the IS error messages?

Thanks.
Labels (1)
0 Kudos
(2) Replies
hidenori
Level 17

In InstallScript MSI projects, if you are using the default OnSQLLogin() InstallScript event, you need to modify the code in order to suppress the error dialog. If you call SQLRTTestConnection2 directly, the IS_SQLSERVER_CA_SILENT property should work.
0 Kudos
Mike2003
Level 3

I have just realised that the error message was being surpressed for SQLRTTestConnection2 but I was not handling the return value of this function correctly which then caused a later SQL function to display the error message.

Thanks.
0 Kudos