Go to Settings | Active profile | Database Select SQLSTATE Click on Add Now insert the Error code and description of the error And change the Class appropriate to the behavior you wish to see. NOTE: The above settings in the active profile GUI are used by Silk Performer to handle database-specific errors. The Error field lists the native error code. The Description should be something meaningful to the user. The Class field ranks the severity of the error. Class 0 errors can be handled within a Silk Performer transaction. Class 1 errors end the transaction but do not cause the simulation to terminate. For example: Message : OdbcExecDirect(ODBC: 5 - ODBC error, 23000 (2627) : [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint "PK_PLAN_". Cannot insert duplicate key in object "PLAN_".) If you wish the transaction to finish instead of the simulation ending; The error code would be 23000 and the description could be primary key violation. And the Class should be changed to the class to 1 BACKGROUND This error is raised because you are attempting to add new record to a table and the new record has exactly the same primary key value as another record already in the table. For example, if the table PK_PLAN had a primary key on a field called PK_PLAN_ID and a record already existed with a value in PK_PLAN_ID of 1234 and you (or someone else) subsequently tried to add another record with a PK_PLAN_ID value of 1234 you would then get the error message you describe. They error relates to the data that is being entered at the time the error was generated and has nothing to do with any Silk Performer settings, etc (although the error can be handled or ignored in several ways as described above).
↧