cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

Rollback, sql scripts and condition: Error 27502

Hi,

I know that conditions are not supported for InstallShield 2008...and it seems to be the same for 2009.
So i'm looking for a workaround...but it's not so easy.
I wanted to integrate condition directly in my script as it is proposed in the following link http://community.installshield.com/showthread.php?t=183921
I support SQL Server and Oracle so i have some connections for SQL and some for Oracle. Each connection has scripts for install, uninstall and...ROLLBACK!
The problem is the following: running on a server with Oracle product, the connections are ok, scripts are executed...but we have an error and we have the rollback action; so rollback is executed, Oracle's scripts for rollback are executed AND as the condition "ServerType=sqlserver" is ignored, the scripts for rollback in SQL server connections for SQL server case are also scheduled to execute...so error during rollback.
So i wanted to try the workaround, integrating condition in script, but the error doesn't happen during the scripts execution but trying to connect with SQL server: Error 27502.Could not connect to Microsoft SQL Server.
Of course! we can't connect to SQL Server...no server, no credentials, we are in an Oracle case!
So what can i do ? do we have a way to evaluate condition for a script during a rollback ? do we have a way to disable a connection (and all scripts in it) during a rollback ?

Thanks for your help.

Chris
Labels (1)
0 Kudos
(2) Replies
hidenori
Level 17

You may want to try using the IS_SQLSERVER_CXNS_ABSENT_FROM_INSTALL Windows Installer property in order to skip one or more connections. In your case, you would need to have two set-property custom actions or control events that will set a connection name you want to skip to that propery depending on the condition "ServerType=sqlserver". Those actions should be called before the SQLLogin dialog is displayed.

Also, I filed the work order #IOC-000080886 so that conditions will work for rollback SQL scripts in a future release.

Hope this helps.
0 Kudos
Not applicable

Thanks a lot.

Two SetProperty for IS_SQLSERVER_CXNS_ABSENT_FROM_INSTALL with conditions...and it works !

Great.

Just a remark: "Use this property to specify one or more SQL connections that should be skipped during installation or uninstallation..." it also works during Rollback 😉
http://helpnet.acresso.com/robo/projects/installshield14helplib/whats_newIS2008.htm
0 Kudos