Condividi tramite


Connectivity error: "name" (Error 1526)

An ODBC error has occurred. Visual FoxPro provides this message as a wrapper for the actual ODBC error. The ODBC error can be generated by the ODBC driver manager, by the ODBC driver, or by the back-end data server. AERROR( ) returns the ODBC errors. The format of an ODBC error 1526, as returned by AERROR( ), is as shown in the following table:

Element number Description
1 Numeric. Contains 1526.
2 Character. The text of the error message.
3 Character. The text of the ODBC error message.
4 Character. The current ODBC SQL state.
5 Numeric. The error number from the ODBC data source.
6 Numeric. The ODBC connection handle.
7 The null value.

The ODBC error message (element number 3) contains the source of the error as the last name in the list preceding the actual error text.

Use the ODBC state code (element number 4) to look up the error in the ODBC book (Programmer's Reference).

For a server error, the data source error is set (element number 5). Use it to look up the error in the server documentation.