Bruce wrote:
> Actual error code numbers/letters.  I think the new elog levels will
> help with this.  We have to decide if we want error numbers, or some
> pneumonic like NOATTR or CONSTVIOL.  I suggest the latter.

Since there is an actual standard for error codes, I would strongly suggest 
to adhere. The standardized codes are SQLSTATE a char(5) (well standardized
for many classes of db errors). Also common, but not so standardized is SQLCODE 
a long (only a very few are standardized, like 100 = 'no data found').
And also sqlca. Also look at ecpg for sqlcode and sqlca.

A Quote from dec rdb:
--------------------------------------------------------------------
   o  SQLCODE-This is the original SQL error handling mechanism.
      It is an integer value. SQLCODE differentiates among errors
      (negative numbers), warnings (positive numbers), succesful
      completion (0), and a special code of 100, which means no
      data. SQLCODE is a deprecated feature of the ANSI/ISO SQL
      standard.

   o  SQLCA-This is an extension of the SQLCODE error handling
      mechanism. It contains other context information that
      supplements the SQLCODE value. SQLCA is not part of the
      ANSI/ISO SQL standard. However, many foreign databases such
      as DB2 and ORACLE RDBMS have defined proprietary semantics and
      syntax to implement it.

   o  SQLSTATE-This is the error handling mechanism for the ANSI/ISO
      SQL standard. The SQLSTATE value is a character string that is
      associated with diagnostic information. To use the SQLSTATE
      status parameter, you must specify the SQL92 dialect and
      compile your module using DEC Rdb Version 6.0.
--------------------------------------------------------------------

Andreas

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to