Specific SQL errors

 

SQL errors

The SQL generated for Sybase RDB can, in certain cases, provoke errors which are then transferred to the application.

 

These errors are as follows:

·         20501 Tablename : May not insert element, cardinality constraint violation

This error is launched when the upper limit of the association's multiplicity is surpassed. In this case, a rollback of the transaction is automatically launched.

 

·         20502 Tablename : May not delete element, cardinality constraint violation

This error is launched when the lower limit of the association's multiplicity is surpassed. In this case, a rollback of the transaction is automatically launched.

 

·         20503 Tablename : May not insert element, primary key of TableName unknown

This error is triggered when you try to create an association towards an instance that is not yet in the database. This error can only be launched if the {gen_cascade} tagged value is present on the association's package. Otherwise, the FOREIGN KEY REFERENCES referential integrity constraint will be violated.

 

·         20504 Tablename : May not update element

This error is set to prevent you from updating tables which materialize associations. Indeed, in these tables you may only insert or delete tuples, but you may never update them. This error can only be launched through external access to the generated code by coupling the Sybase RDB.