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
- :
- InstallScript Project problem: OnInstalled + SQL database
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
Nov 27, 2009
02:12 PM
InstallScript Project problem: OnInstalled + SQL database
Hi,
I've hit a following issue:
I have an InstallScript project.
In it I have a feature associated with few SQL script components that upgrade existing SQL Server database (schema changes, script changes, new data inserted to some tables). Since the changes are deeper and cannot be simply handled by SQL scripts, I got from devs .exe tool that needs to be executed after the scripts that does the rest of upgrading.
So I've discovered that there's this nice 'OnInstalled' part that allows me to select InstallScript function to execute when the feature is installed - at least that's what I'm being told by the IDE.
So I have such function where I call this tool. Unfortunately, when executed, the tool throws exceptions that point to conclusion, that it is being executed before changes to database schema are committed. When I manually launch the tool shortly after - it works like a charm.
Is this a known bug or just it so happens to work this way?
I've hit a following issue:
I have an InstallScript project.
In it I have a feature associated with few SQL script components that upgrade existing SQL Server database (schema changes, script changes, new data inserted to some tables). Since the changes are deeper and cannot be simply handled by SQL scripts, I got from devs .exe tool that needs to be executed after the scripts that does the rest of upgrading.
So I've discovered that there's this nice 'OnInstalled' part that allows me to select InstallScript function to execute when the feature is installed - at least that's what I'm being told by the IDE.
So I have such function where I call this tool. Unfortunately, when executed, the tool throws exceptions that point to conclusion, that it is being executed before changes to database schema are committed. When I manually launch the tool shortly after - it works like a charm.
Is this a known bug or just it so happens to work this way?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 02, 2009
12:44 PM
A feature installed event should run after any SQL scripts included in any components in the feature. An exception to this would be if batch mode is enabled for SQL scripts, in which case the SQL scripts will not run until after the feature installed event is sent (the OnSQLBatchScripts or OnMoved events could be used in this case).
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)