Handling Database Errors
This section describes the tools available in OpenROAD to detect and trap DBMS errors. Using these tools, you can develop an error-handling strategy appropriate for your application's needs. Several possible strategies are described, with an example of each.
In OpenROAD, you must check for DBMS errors after any database statement or method invocation that issues database statements. Use the tools described in the following lists to check for errors.
Two attributes defined for the DBSessionObject system class provide primary error-checking capability:
• ErrorNumber
• DBMSError
DataStream objects provide their own error-checking tools:
• ErrorNo attribute
• IsDBError attribute
• Status returned by methods that access the database
Ingres also provides the inquire_sql statement as an alternative tool.
Errors that originate in other portions of the application, for example, from a called procedure, are discussed in
Errors Originating in Called 3GL Procedures.
Last modified date: 12/20/2023