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
- :
- InstallShield SQL Script Execution Order
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
‎Sep 20, 2007
12:12 AM
InstallShield SQL Script Execution Order
Hi Peoples, I am currently having trouble with executing an SQL Script through my Installer Application. If i run the script through SQL Server it executes fine. The problem is that when the script runs to create views it validate the view on fly. This causes me issues when the view has sub views and these views are not created before the header view (so the installer thinks the sub view does not exist) and it errors. The only fix is to go through the script and make sure that the sequence of view creation is all set so sub views are done before their parent views. This is a painstaking process as there is hundreds of views.
Has anyone come across this problem and got any fixes?
Thanks
Has anyone come across this problem and got any fixes?
Thanks
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 20, 2007
09:44 AM
What project type are you using? If you are using a pure InstallScript project, you must turn on the Batch Mode from the root level shortcut menu of the SQL Scripts view to execute SQL scripts in the order as displayed in the view.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 20, 2007
08:39 PM
Hi hidenori, Thanks for the reply. This doesnt seem to have fixed the problem. I am not using an InstallScript project, i am using a Basic MSI project. I did try doing it through an InstallScript project though but still had the same problem. I will better explain the problem.
I am creating a basic install to install a database up to the users server. I used the database import wizard to create the script from our database. The problem is when we have Views which have sub views which are out of order.
e.g. vwMainview has 2 subviews called vwSubView1 and vwSubView2
If the sql script puts the orders out of whack like the following:
***************
'CREATE VWSUBVIEW1
'CREATE VWMAINVIEW
'CREATE VWSUBVIEW2
***************
This will cause an error to occur stating that the vwSubView2 cannot be found while creating vwMainView.
Other than going through the script and reordering all the views so that the subViews are always created before their parent views (this would be ugly since there are hundreds of views), I cannot think of a fix. Setting the batch mode didnt seem to fix this problem.
Is there any other way?
Thanks
I am creating a basic install to install a database up to the users server. I used the database import wizard to create the script from our database. The problem is when we have Views which have sub views which are out of order.
e.g. vwMainview has 2 subviews called vwSubView1 and vwSubView2
If the sql script puts the orders out of whack like the following:
***************
'CREATE VWSUBVIEW1
'CREATE VWMAINVIEW
'CREATE VWSUBVIEW2
***************
This will cause an error to occur stating that the vwSubView2 cannot be found while creating vwMainView.
Other than going through the script and reordering all the views so that the subViews are always created before their parent views (this would be ugly since there are hundreds of views), I cannot think of a fix. Setting the batch mode didnt seem to fix this problem.
Is there any other way?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 24, 2007
08:14 PM
Thank you for the clarification. I tried it with a very simple views which have some dependencies, but the database import wizard generated a script in a correct order. Would it be possible for you to provide a sample database (with a disk backup file) that reproduces the behavior so that I can look into the issue?
Thank you for your patience and cooperation.
Thank you for your patience and cooperation.