Summary
Discussion about options using SQL script view and runtime error trapping
Synopsis
There is no native support to trap and then prompt that an error at runtime caused by a SQL script has occurred. For example, if you include a SQL script that errors during runtime there are some options to use in an effort to handle the error case. However, you cannot prompt the user that some error has occurred natively.
Discussion
If your script exposes an error at runtime you have options set in the project to Goto Next Script, Goto Next Statement, Abort the Installation or define an override for the scripts default error handling. The last option is achieved when you select 'Custom' and manually set the error handling. Error handling settings are set on the tab 'Runtime' in the IDE.
When using 'Custom' you can trap the error and set the specific behavior based on the three mentioned above. For example, to you trap for Violation of PRIMARY KEY constraint you set in the project On Error Abort the Installation, Goto Next Script or Goto Next Statement.
There is a debugging option pre-build. The InstallShield product includes support when/if you have Microsoft SQL Server Management Studio or Microsoft SQL Server 2000 SQL Query Analyzer installed on your system, you can open a new SQL script that you have added to your project to test, edit, and syntax-check the script. To launch one of those tools and open your script from within InstallShield, right-click the script file in the SQL Scripts view and then click Open Script in Microsoft SQL Server Management Studio. InstallShield searches for one of the following tools and launches the first one that it finds:
- Microsoft SQL Server 2008 Management Studio (any edition, including Express; ssms.exe)
- Microsoft SQL Server 2005 Management Studio (SqlWb.exe);
- Microsoft SQL Server 2005 Management Studio Express (ssmsee.exe)
- Microsoft SQL Server 2000 Query Analyzer (isqlw.exe)
Related Documents
Reference Helpnet article: Adding a New SQL Script
Related KB Articles
For information about an approach Microsoft documents please see their KB:
Related Articles
BuildFabricatedComputerList step in ManageSoft reader may fail with error: "Violation of PRIMARY KEY constraint 'PK__#Part… 19Number of Views "Sync License Reconcile Results" reconcile step may generate invalid license assignments and fail: "Violation of PRIMARY … 10Number of Views ImportTDSComputer import writer step may fail with error when retrying step after a deadlock: "Violation of PRIMARY KEY co… 21Number of Views Active Directory data fails to be imported with error if details of an organizational unit are specified multiple times in… 8Number of Views Troubleshooting the error: "Violation of PRIMARY KEY constraint - Cannot insert duplicate key in object" 69Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago