Accessing and Changing Relational Data

Error Handling

Errors raised in Microsoft® SQL Server™ 2000 have several attributes:

All of the SQL Server errors are stored in the system table master.dbo.sysmessages. User-defined messages can also be stored in sysmessages. The RAISERROR statement can then be used to return these user-defined errors to an application if necessary.

All the database APIs, such as ADO, OLE DB, ODBC, DB-Library, and Embedded SQL, report the basic error attributes: the error number and message string. However, there are variations in how many of the other error attributes each database can report.

Other SQL Server components can also raise errors:

See Also

sysmessages