---
title: "ODBC Error Codes (Visual FoxPro ODBC Driver) | 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:
- "Visual FoxPro ODBC driver [ODBC], error codes"
- "Visual FoxPro error codes"
- "error messages [ODBC], Visual FoxPro ODBC driver"
- "SQLSTATE [ODBC]"
- "FoxPro ODBC driver [ODBC], error codes"
ms.assetid: 9b4251f2-6fa6-49df-8abf-7cc1cc35d1c8
author: David-Engel
ms.author: v-daenge
---
# ODBC Error Codes (Visual FoxPro ODBC Driver)
The following table lists Visual FoxPro error codes mapped to ODBC Error Code SQLSTATE values. The mapped SQLSTATE values come from [SQLExecDirect](../../odbc/microsoft/sqlexecdirect-visual-foxpro-odbc-driver.md) and [SQLPrepare](../../odbc/microsoft/sqlprepare-visual-foxpro-odbc-driver.md). No other SQLSTATE values from other ODBC API are mapped because **SQLExecDirect** and **SQLPrepare** are the only functions that access the Visual FoxPro engine.
For more information on ODBC error codes, see [Appendix A: ODBC Error Codes](../../odbc/reference/appendixes/appendix-a-odbc-error-codes.md), in the *ODBC Programmer's Reference*.
|SQLSTATE|Visual FoxPro error code|
|--------------|------------------------------|
|S1001|149
150
182
202
308|
|1004|159|
|37000|132
200
219
221
222
227
229
230
498
499
713
901|
|22005|301
302|
|22012|307|
|23000|581
583
884
886
988|
|S0001|121
571|
|S0002|173
120
123
295
562
563
802|
|S0012|683|
|S0021|156
712|
|S0022|158
806|
|S1000|100
101
102
105
107
109
110
111
113
114
115
118
119
125
133
135
136
137
145
146
171
173
177
201
205
239
240
252
257
296
305
407
410
462
502
503
520
538
550
561
567
570
575
578
580
585
602
702
705
707
708
718
750
872
879
887
888
912
914
915
918
922
923
947
976
999|