This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Triggering a Small update rollback
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 05, 2011
11:01 AM
Triggering a Small update rollback
Hi Folks,
I have created a small update for my install which works great.
It contains 3 C++ DLLs and a database script.
I want to trigger a rollback of the Small Update if the running of the SQL database script fails.
Currently if the SQL database script fails, the Small Update carries on regardless. This is not what I want, because the three DLLs are installed while the database script fails.
I use SQLCMD to run the SQL script.
Is it possible to create a rollback event for the Small Patch that I can initiate on my own error message?
I have created a small update for my install which works great.
It contains 3 C++ DLLs and a database script.
I want to trigger a rollback of the Small Update if the running of the SQL database script fails.
Currently if the SQL database script fails, the Small Update carries on regardless. This is not what I want, because the three DLLs are installed while the database script fails.
I use SQLCMD to run the SQL script.
Is it possible to create a rollback event for the Small Patch that I can initiate on my own error message?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2011
04:15 AM
If you use the SQL Scripts view provided by install shield itself this rollback thing could be handled swiftly. There you can provide the sql script that you wanted to use during the rollback and you can condition it accordingly also.
In your case you are using SQLCMD to run the SQL script from a customaction i suppose and can you tell me how are planning to initiate the rollback on your own error message?
In your case you are using SQLCMD to run the SQL script from a customaction i suppose and can you tell me how are planning to initiate the rollback on your own error message?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2011
05:43 AM
mano.n.s75 wrote:
If you use the SQL Scripts view provided by install shield itself this rollback thing could be handled swiftly. There you can provide the sql script that you wanted to use during the rollback and you can condition it accordingly also.
In your case you are using SQLCMD to run the SQL script from a customaction i suppose and can you tell me how are planning to initiate the rollback on your own error message?
Hi mano.n.s75,
If the SQL script fails in SQLCMD, an error message is logged in the registry using TSQL RegWrite command.
Installscript will check this registry entry and hopefully rollback the whole small update on SQL failure.
Is there a specific Installscript call to trigger a Small Update rollback at this stage?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2011
07:08 AM
If you are using Install Script or Install Script MSI check this "SQLRTDoRollbackAll()".
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 08, 2011
07:27 AM
Hi mano,
I have a Basic MSI project.
SQLRTDoRollbackAll() is just to rollback any SQL scripts , but we already have "Rollback Transaction" implemented in our TSQLscript.
The problem is I want the whole small update to be rolled back when the SQL script fails.
is there a command for doing that, like MSIRollbackpatch() that can be called from InstallScript or something along those lines so that the new dlls are removed and application and SQL server are back in sync?
I have a Basic MSI project.
SQLRTDoRollbackAll() is just to rollback any SQL scripts , but we already have "Rollback Transaction" implemented in our TSQLscript.
The problem is I want the whole small update to be rolled back when the SQL script fails.
is there a command for doing that, like MSIRollbackpatch() that can be called from InstallScript or something along those lines so that the new dlls are removed and application and SQL server are back in sync?