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
- :
- SQL Scripts Issue
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
‎Dec 11, 2007
03:10 PM
SQL Scripts Issue
I have a web project where I want SQL Scripts to only run the first time the product is installed. This part works fine. The second part of it is that I have set a conditional statement for each SQL Script so it should only run when it is NOT Installed.
So ideally, if I run the installer again and I pick the Repair option, the scripts should NOT run due to the fact that they have already been installed and due to the condition not being met. However, they are still being run.
Does anybody have any ideas as to what else I could try?
Thanks in advance.
So ideally, if I run the installer again and I pick the Repair option, the scripts should NOT run due to the fact that they have already been installed and due to the condition not being met. However, they are still being run.
Does anybody have any ideas as to what else I could try?
Thanks in advance.
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 11, 2007
04:25 PM
I recommend that you use the Custom Error Handling functionality in order to accomplish your requirement, instead of using Windows Installer's component conditions. You need to check something on your database to determine whether you should run your SQL script or not. Please refer to this thread for more information about it.
Hope that helps.
Hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 13, 2007
10:29 AM
I ended up using an IF, Begin...End statement within my SQL scripts and that seems to have gotten the job done. Thanks for your help.
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)