Dataset objects contain attributes that enable you to detect and handle dataset-related errors. Dataset related errors occur in the server and are detected and handled in both the server and the client.

Errors could occur for a variety of reasons—some errors are system-generated, while others are in the data that you write application code to detect.

System-generated errors could include:

  • Adding an Order record with an order number that already exists in the database.
  • Modifying an Order record where another user has already modified it and the retrieved data in the client does not match what was in the database.

Data-related errors that you write application code to detect could include:

  • Adding a PurchaseOrder with a supplier ID number that is not valid.
  • Making a change to the POLine's discount that is larger than the limit.

System-generated errors set the ERROR attribute. In addition, you can write application code to set and get the REJECTED attribute and ERROR attribute to detect and handle data-related errors. You can also write application code to set the ERROR-STRING attribute to provide information about errors that occurred.

See also

Set and use ERROR, ERROR-STRING, and REJECTED in Use ProDataSets