Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 1.74 KB

sequence-of-status-records.md

File metadata and controls

24 lines (20 loc) · 1.74 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Sequence of Status Records
Sequence of Status Records
David-Engel
v-davidengel
01/19/2017
sql
connectivity
conceptual
diagnostic information [ODBC], diagnostic records
status records [ODBC]
diagnostic records [ODBC]

Sequence of Status Records

If two or more status records are returned, the Driver Manager and driver rank them according to the following rules. The record with the highest rank is the first record. The source of a record (Driver Manager, driver, gateway, and so on) is not considered when ranking records.

  • Errors Status records that describe errors have the highest rank. Among error records, records that indicate a transaction failure or possible transaction failure outrank all other records. If two or more records describe the same error condition, SQLSTATEs defined by the Open Group CLI specification (classes 03 through HZ) outrank ODBC-defined and driver-defined SQLSTATEs.

  • Implementation-defined No Data Values Status records that describe driver-defined No Data values (class 02) have the second highest rank.

  • Warnings Status records that describe warnings (class 01) have the lowest rank. If two or more records describe the same warning condition, warning SQLSTATEs defined by the Open Group CLI specification outrank ODBC-defined and driver-defined SQLSTATEs.

If there are two or more records with the highest rank, it is undefined which record is the first record. The order of all other records is undefined. In particular, because warnings may appear before errors, applications should check all status records when a function returns a value other than SQL_SUCCESS.