
aaron_000_1.5524903577501443E12 asked a question.
SQLRTDoRollbackAll function wont execute SQL scripts scheduled to run during rollback
Hi
basically my problem is:
SQLRTDoRollbackAll function wont execute a SQL scripts scheduled to run during rollback
I create a database with one script - and try populate it with tables - there is a intentional error in the populate tables (which causes a rollback) - i can trace this in debug mode
i have a script to remove the database on rollback (check box run on rollback is ticked) but it dosnt seem to work???
**rmdatabase** and **rmdatabaseConfig** are replaced with the names of the database that is created,
Use Master
--Remove the Database if rollBack is needed
DROP DATABASE **rmdatabase**
--Remove the Config Database if rollBack is needed
DROP DATABASE **rmdatabaseConfig**
Any ideas what i should try? - i have been googling this error for a while - found nothing!!
Thanks for the Help / advice
A
[LIST=1]- Create a new InstallScript project.
- Go to the SQL Scripts view.
- Add a connection and two SQL scripts.
- Write an incorrect T-SQL statement in the first SQL script, and schedule it to run during install.
- Write a correct T-SQL statement such as creating a new table in the second SQL script, and schedule it to run during rollback.
- Build and run the setup.
- On the SQLLogin dialog, provide a valid login information, and then proceed the setup.
- When you get an error during installation, click the OK on the error dialog.
- Observe the database using Microsoft SQL Server Management Studio.
Expected result: the new table should be created by the second SQL script.