Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 2.5 KB

File metadata and controls

50 lines (38 loc) · 2.5 KB
title Error Messages (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
error messages [ODBC], Visual FoxPro ODBC driver
Visual FoxPro ODBC driver [ODBC], error messages
SQLSTATE [ODBC]
FoxPro ODBC driver [ODBC], error messages
ms.assetid 58ea9734-4edf-44da-ba80-938aa7b340e4
author David-Engel
ms.author v-daenge

Error Messages (Visual FoxPro ODBC Driver)

When an error occurs, the Visual FoxPro driver returns the following information:

  • The native error number and error message text

  • The SQLSTATE (an ODBC error code) and error message text

You access this error information by calling SQLError.

Native Errors

For errors that occur in the data source, the Visual FoxPro driver returns the native error number and error message text. For a list of native error numbers, see Visual FoxPro ODBC Driver Native Error Messages.

SQLSTATE (ODBC Error Codes)

For errors that are detected and returned by the Visual FoxPro driver, the driver maps the returned native error number to the appropriate SQLSTATE. If a native error number does not have an ODBC error code to map to, the Visual FoxPro driver returns SQLSTATE S1000 (General error).

For a list of SQLSTATE values generated by the Visual FoxPro ODBC Driver for corresponding Visual FoxPro errors, see ODBC Error Codes.

Syntax

Error messages have the following format:

[ vendor ][ ODBC_component ] error_message

The prefixes in brackets ([ ]) identify the source of the error as defined in the following table.

Data source Prefix Value
Driver Manager [vendor]
[ODBC_component]
[data_source]
[Microsoft]
[ODBC Driver Manager]
N/A
Visual FoxPro driver vendor]
[ODBC_component]
[data_source]
[Microsoft]
[ODBC Visual FoxPro driver]
N/A

For example, if the Visual FoxPro ODBC Driver could not find the file employee.dbf, it might return the following error message:

"[Microsoft][ODBC Visual FoxPro Driver]File 'employee.dbf' does not exist"