--- title: "SQLSTATE | Microsoft Docs" ms.custom: "" ms.date: "01/19/2017" ms.prod: sql ms.prod_service: connectivity ms.reviewer: "" ms.technology: connectivity ms.topic: conceptual helpviewer_keywords: - "SQLSTATE" ms.assetid: 942f53f8-7755-418c-b453-047b3e030156 author: David-Engel ms.author: v-daenge --- # SQLSTATE For errors that occur in the data source, the ODBC driver maps the returned native error to the appropriate SQLSTATE. For errors that are detected by the driver or the Driver Manager, the ODBC driver or Driver Manager generates the appropriate SQLSTATE.