Summary
Discussion about options using SQL script view and runtime error trappingSynopsis
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 ScriptRelated KB Articles
For information about an approach Microsoft documents please see their KB:Error "Violation of PRIMARY KEY Constraint PKRM30301 Cannot Insert Duplicate Key" when running Paid Transaction Removal in Receivables Management
Was this helpful?
Related Articles
BuildFabricatedComputerList step in ManageSoft reader may fail with error: "Violation of PRIMARY KEY constraint 'PK__#Part… 9Number of Views Known Issue: Software license Consumption tab may fail to load with red bar error, and error in webui.log: "Violation of P… 31Number of Views Troubleshooting the error: "Violation of PRIMARY KEY constraint - Cannot insert duplicate key in object" 56Number of Views "Sync License Reconcile Results" reconcile step may generate invalid license assignments and fail: "Violation of PRIMARY … 6Number of Views Error: Violation of PRIMARY KEY constraint 'PK_#Cluster_XXXX'. Cannot insert duplicate key in object 'dbo.#ClusterGroup' 12Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
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. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago