Error 42000 Microsoft Odbc Visual Foxpro Driver Syntax Error Or Access Violation

  суббота 04 апреля
      83

C language book pdf download

Trouble calling VFP stored procedures with Win32::ODBC Yes - I've tried 'do spfoo' also - with the same result. It seems that VFP ODBC only accepts the syntax SELECT - INSERT - UPDATE.

Error 42000 Microsoft Odbc Visual Foxpro Driver Syntax Error Or Access Violation-->

This topic discusses SQLSTATE values for ODBC 3.x. For more information on ODBC 3.x SQLSTATE values, see SQLSTATE Mappings.

SQLGetDiagRec or SQLGetDiagField returns SQLSTATE values as defined by Open Group Data Management: Structured Query Language (SQL), Version 2 (March 1995). SQLSTATE values are strings that contain five characters. The following table lists SQLSTATE values that a driver can return for SQLGetDiagRec.

The character string value returned for an SQLSTATE consists of a two-character class value followed by a three-character subclass value. A class value of '01' indicates a warning and is accompanied by a return code of SQL_SUCCESS_WITH_INFO. Class values other than '01,' except for the class 'IM,' indicate an error and are accompanied by a return value of SQL_ERROR. The class 'IM' is specific to warnings and errors that derive from the implementation of ODBC itself. The subclass value '000' in any class indicates that there is no subclass for that SQLSTATE. The assignment of class and subclass values is defined by SQL-92.

Note

Although successful execution of a function is normally indicated by a return value of SQL_SUCCESS, the SQLSTATE 00000 also indicates success.

SQLSTATEErrorCan be returned from
01000General warningAll ODBC functions except:
SQLError
SQLGetDiagField
SQLGetDiagRec
01001Cursor operation conflictSQLExecDirect
SQLExecute
SQLParamData
SQLSetPos
01002Disconnect errorSQLDisconnect
01003NULL value eliminated in set functionSQLExecDirect
SQLExecute
SQLParamData
01004String data, right-truncatedSQLBrowseConnect
SQLBulkOperations
SQLColAttribute
SQLDataSources
SQLDescribeCol
SQLDriverConnect
SQLDrivers
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetConnectAttr
SQLGetCursorName
SQLGetData
SQLGetDescField
SQLGetDescRec
SQLGetEnvAttr
SQLGetInfo
SQLGetStmtAttr
SQLNative
Sql SQLParamData
SQLPutData
SQLSetCursorName
01006Privilege not revokedSQLExecDirect
SQLExecute
SQLParamData
01007Privilege not grantedSQLExecDirect
SQLExecute
SQLParamData
01S00Invalid connection string attributeSQLBrowseConnect
SQLDriverConnec
01S01Error in rowSQLBulkOperations
SQLExtendedFetch
SQLSetPos
01S02Option value changedSQLBrowseConnect
SQLConnect
SQLDriverConnect
SQLExecDirect
SQLExecute
SQLParamData
SQLPrepare
SQLSetConnectAttr
SQLSetDescField
SQLSetEnvAttr
SQLSetStmtAttr
01S06Attempt to fetch before the result set returned the first rowsetSQLExtendedFetch
SQLFetchScroll
01S07Fractional truncationSQLBulkOperations
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetData
SQLParamData
SQLSetPos
01S08Error saving File DSNSQLDriverConnect
01S09Invalid keywordSQLDriverConnect
07001Wrong number of parametersSQLExecDirect
SQLExecute
07002COUNT field incorrectSQLExecDirect
SQLExecute
SQLParamData
07005Prepared statement not a cursor-specificationSQLColAttribute
SQLDescribeCol
07006Restricted data type attribute violationSQLBindCol
SQLBindParameter
SQLBulkOperations
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetData
SQLParamData
SQLPutData
SQLSetPos
07009Invalid descriptor indexSQLBindCol
SQLBindParameter
SQLBulkOperations
SQLColAttribute
SQLDescribeCol
SQLDescribeParam
SQLFetch
SQLFetchScroll
SQLGetData
SQLGetDescField
SQLGetDescRec
SQLParamData
SQLSetDescField
SQLSetDescRecSQLSetPos
07S01Invalid use of default parameterSQLExecDirect
SQLExecute
SQLParamData
SQLPutData
08001Client unable to establish connectionSQLBrowseConnect
SQLConnect
SQLDriverConnect
08002Connection name in useSQLBrowseConnect
SQLConnect
SQLDriverConnect
SQLSetConnectAttr
08003Connection not openSQLAllocHandle
SQLDisconnect
SQLEndTran
SQLGetConnectAttr
SQLGetInfo
SQLNativeSql
SQLSetConnectAttr
08004Server rejected the connectionSQLBrowseConnect
SQLConnect
SQLDriverConnect
08007Connection failure during transactionSQLEndTran
08S01Communication link failureSQLBrowseConnect
SQLColumnPrivileges
SQLColumns
SQLConnect
SQLCopyDesc
SQLDescribeCol
SQLDescribeParam
SQLDriverConnect
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLForeignKeys
SQLGetConnectAttr
SQLGetData
SQLGetDescField
SQLGetDescRec
SQLGetFunctions
SQLGetInfo
SQLGetTypeInfo
SQLMoreResults
SQLNativeSql
SQLNumParams
SQLNumResultCols
SQLParamData
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLPutData
SQLSetConnectAttr
SQLSetDescField
SQLSetDescRec
SQLSetEnvAttr
SQLSetStmtAttr
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
21S01Insert value list does not match column listSQLExecDirect
SQLPrepare
21S02Degree of derived table does not match column listSQLBulkOperations
SQLExecDirect
SQLExecute
SQLParamData
SQLPrepare
SQLSetPos
22001String data, right-truncatedSQLBulkOperations
SQLExecDirect
SQLExecute
SQLFetch
SQLFetchScroll
SQLParamData
SQLPutData
SQLSetDescField
SQLSetPos
22002Indicator variable required but not suppliedSQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetData
SQLParamData
22003Numeric value out of rangeSQLBulkOperations
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetData
SQLGetInfo
SQLParamData
SQLPutData
SQLSetPos
22007Invalid datetime formatSQLBulkOperations
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetData
SQLParamData
SQLPutData
SQLSetPos
22008Datetime field overflowSQLBulkOperations
SQLExecDirect
QLParamData
SQLPutData
22012Division by zeroSQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetData
SQLPutData
22015Interval field overflowSQLBulkOperations
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetData
SQLParamData
SQLPutData
SQLSetPos
22018Invalid character value for cast specificationSQLBulkOperations
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLGetData
SQLParamData
SQLPutData
SQLSetPos
22019Invalid escape characterSQLExecDirect
SQLExecute
SQLPrepare
22025Invalid escape sequenceSQLExecDirect
SQLExecute
SQLPrepare
22026String data, length mismatchSQLParamData
23000Integrity constraint violationSQLBulkOperations
SQLExecDirect
SQLExecute
SQLParamData
SQLSetPos
24000Invalid cursor stateSQLBulkOperations
SQLCloseCursor
SQLColumnPrivileges
SQLColumns
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLForeignKeys
SQLGetData
SQLGetStmtAttr
SQLGetTypeInfo
SQLNativeSql
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLSetConnectAttr
SQLSetCursorName
SQLSetPos
SQLSetStmtAttr
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
25000Invalid transaction stateSQLDisconnect
25S01Transaction stateSQLEndTran
25S02Transaction is still activeSQLEndTran
25S03Transaction is rolled backSQLEndTran
28000Invalid authorization specificationSQLBrowseConnect
SQLConnect
SQLDriverConnect
34000Invalid cursor nameSQLExecDirect
SQLPrepare
SQLSetCursorName
3C000Duplicate cursor nameSQLSetCursorName
3D000Invalid catalog nameSQLExecDirect
SQLPrepare
SQLSetConnectAttr
3F000Invalid schema nameSQLExecDirect
SQLPrepare
40001Serialization failureSQLBulkOperations
SQLColumnPrivileges
SQLColumns
SQLEndTran
SQLExecDirect
SQLExecute
SQLFetch
SQLFetchScroll
SQLForeignKeys
SQLGetTypeInfo
SQLMoreResults
SQLParamData
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLSetPos
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
40002Integrity constraint violationSQLEndTran
40003Statement completion unknownSQLBulkOperations
SQLColumnPrivileges
SQLColumns
SQLExecDirect
SQLExecute
SQLFetch
SQLFetchScroll
SQLForeignKeys
SQLGetTypeInfo
SQLMoreResults
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLParamData
SQLSetPos
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
42000Syntax error or access violationSQLBulkOperations
SQLExecDirect
SQLExecute
SQLParamData
SQLPrepare
SQLSetPos
42S01Base table or view already existsSQLExecDirect
SQLPrepare
42S02Base table or view not foundSQLExecDirect
SQLPrepare
42S11Index already existsSQLExecDirect
SQLPrepare
42S12Index not foundSQLExecDirect
SQLPrepare
42S21Column already existsSQLExecDirect
SQLPrepare
42S22Column not foundSQLExecDirect
SQLPrepare
44000WITH CHECK OPTION violationSQLBulkOperations
SQLExecDirect
SQLExecute
SQLParamData
SQLSetPos
HY000General errorAll ODBC functions except:
SQLError
SQLGetDiagField
SQLGetDiagRec
HY001Memory allocation errorAll ODBC functions except:
SQLError
SQLGetDiagField
SQLGetDiagRec
HY003Invalid application buffer typeSQLBindCol
SQLBindParameter
SQLGetData
HY004Invalid SQL data typeSQLBindParameter
SQLGetTypeInfo
HY007Associated statement is not preparedSQLCopyDesc
SQLGetDescField
SQLGetDescRec
HY008Operation canceledAll ODBC functions that can be processed asynchronously:
SQLBrowseConnect
SQLBulkOperations
SQLColAttribute
SQLColumnPrivileges
SQLColumns
SQLConnect
SQLDescribeCol
SQLDescribeParam
SQLDisconnect
SQLDriverConnect
SQLEndTran
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLForeignKeys
SQLGetData
SQLGetTypeInfo
SQLMoreResults
SQLNumParams
SQLNumResultCols
SQLParamData
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLPutData
SQLSetConnectAttr
SQLSetPos
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
HY009Invalid use of null pointerSQLAllocHandle
SQLBindParameter
SQLBulkOperations
SQLColumnPrivileges
SQLColumns
SQLExecDirect
SQLForeignKeys
SQLGetCursorName
SQLGetData
SQLGetFunctions
SQLNativeSql
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLPutData
SQLSetConnectAttr
SQLSetCursorName
SQLSetEnvAttr
SQLSetStmtAttr
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
HY010Function sequence errorSQLAllocHandle
SQLBindCol
SQLBindParameter
SQLBulkOperations
SQLCloseCursor
SQLColAttribute
SQLColumnPrivileges
SQLColumns
SQLCopyDesc
SQLDescribeCol
SQLDescribeParam
SQLDisconnect
SQLEndTran
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLForeignKeys
SQLFreeHandle
SQLFreeStmt
SQLGetConnectAttr
SQLGetCursorName
SQLGetData
SQLGetDescField
SQLGetDescRec
SQLGetFunctions
SQLGetStmtAttr
SQLGetTypeInfo
SQLMoreResults
SQLNumParams
SQLNumResultCols
SQLParamData
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLPutData
SQLRowCount
SQLSetConnectAttr
SQLSetCursorName
SQLSetDescField
SQLSetEnvAttr
SQLSetDescRec
SQLSetPos
SQLSetStmtAttr
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
HY011Attribute cannot be set nowSQLBulkOperations
SQLParamData
QLSetPos
SQLSetStmtAttr
HY012Invalid transaction operation codeSQLEndTran
HY013Memory management errorAll ODBC functions except:
SQLGetDiagField
SQLGetDiagRec
HY014Limit on the number of handles exceededSQLAllocHandle
HY015No cursor name availableSQLGetCursorName
HY016Cannot modify an implementation row descriptorSQLCopyDesc
SQLSetDescField
SQLSetDescRec
HY017Invalid use of an automatically allocated descriptor handleSQLFreeHandle
SQLSetStmtAttr
HY018Server declined cancel requestSQLCancel
HY019Non-character and non-binary data sent in piecesSQLPutData
HY020Attempt to concatenate a null valueSQLPutData
HY021Inconsistent descriptor informationSQLBindParameter
SQLCopyDesc
SQLGetDescField
SQLSetDescField
SQLSetDescRec
HY024Invalid attribute valueSQLSetConnectAttr
SQLSetEnvAttr
SQLSetStmtAttr
HY090Invalid string or buffer lengthSQLBindCol
SQLBindParameter
SQLBrowseConnect
SQLBulkOperations
SQLColAttribute
SQLColumnPrivileges
SQLColumns
SQLConnect
SQLDataSources
SQLDescribeCol
SQLDriverConnect
SQLDrivers
SQLExecDirect
SQLExecute
SQLFetch
SQLFetchScroll
SQLForeignKeys
SQLGetConnectAttr
SQLGetCursorName
SQLGetData
SQLGetDescField
SQLGetInfo
SQLGetStmtAttr
SQLNativeSql
SQLParamData
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLPutData
SQLSetConnectAttr
SQLSetCursorName
SQLSetDescField
SQLSetDescRec
SQLSetEnvAttr
SQLSetStmtAttr
SQLSetPos
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
HY091Invalid descriptor field identifierSQLColAttribute
SQLGetDescField
SQLSetDescField
HY092Invalid attribute/option identifierSQLAllocHandle
QLBulkOperations
SQLCopyDesc
SQLDriverConnect
SQLEndTran
SQLFreeStmt
SQLGetConnectAttr
SQLGetEnvAttr
QLParamData
SQLSetConnectAttr
SQLSetDescField
SQLSetEnvAttr
SQLSetPos
SQLSetStmtAttr
HY095Function type out of rangeSQLGetFunctions
HY096Invalid information typeSQLGetInfo
HY097Column type out of rangeSQLSpecialColumns
HY098Scope type out of rangeSQLSpecialColumns
HY099Nullable type out of rangeSQLSpecialColumns
HY100Uniqueness option type out of rangeSQLStatistics
HY101Accuracy option type out of rangeSQLStatistics
HY103Invalid retrieval codeSQLDataSources
SQLDrivers
HY104Invalid precision or scale valueSQLBindParameter
HY105Invalid parameter typeSQLBindParameter
SQLExecDirect
SQLExecute
SQLParamData
SQLSetDescField
HY106Fetch type out of rangeSQLExtendedFetch
SQLFetchScroll
HY107Row value out of rangeSQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLSetPos
HY109Invalid cursor positionSQLExecDirect
SQLExecute
SQLGetData
SQLGetStmtAttr
SQLNativeSql
SQLParamData
SQLSetPos
HY110Invalid driver completionSQLDriverConnect
HY111Invalid bookmark valueSQLExtendedFetch
SQLFetchScroll
HYC00Optional feature not implementedSQLBindCol
SQLBindParameter
SQLBulkOperations
SQLColAttribute
SQLColumnPrivileges
SQLColumns
SQLDriverConnect
SQLEndTran
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLFetch
SQLFetchScroll
SQLForeignKeys
SQLGetConnectAttr
SQLGetData
SQLGetEnvAttr
SQLGetInfo
SQLGetStmtAttr
SQLGetTypeInfo
SQLParamData
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLSetConnectAttr
SQLSetEnvAttr
SQLSetPos
SQLSetStmtAttr
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
HYT00Timeout expiredSQLBrowseConnect
SQLBulkOperations
SQLColumnPrivileges
SQLColumns
SQLConnect
SQLDriverConnect
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLForeignKeys
SQLGetTypeInfo
SQLParamData
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLSetPos
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
HYT01Connection timeout expiredAll ODBC functions except:
SQLDrivers
SQLDataSources
SQLGetEnvAttr
SQLSetEnvAttr
IM001Driver does not support this functionAll ODBC functions except:
SQLAllocHandle
SQLDataSources
SQLDrivers
SQLFreeHandle
SQLGetFunctions
IM002Data source name not found and no default driver specifiedSQLBrowseConnect
SQLConnect
SQLDriverConnect
IM003Specified driver could not be loadedSQLBrowseConnect
SQLConnect
SQLDriverConnect
IM004Driver's SQLAllocHandle on SQL_HANDLE_ENV failedSQLBrowseConnect
SQLConnect
SQLDriverConnect
IM005Driver's SQLAllocHandle on SQL_HANDLE_DBC failedSQLBrowseConnect
SQLConnect
SQLDriverConnect
IM006Driver's SQLSetConnectAttr failedSQLBrowseConnect
SQLConnect
SQLDriverConnect
IM007No data source or driver specified; dialog prohibitedSQLDriverConnect
IM008Dialog failedSQLDriverConnect
IM009Unable to load translation DLLSQLBrowseConnect
SQLConnect
SQLDriverConnect
SQLSetConnectAttr
IM010Data source name too longSQLBrowseConnect
SQLConnect
SQLDriverConnect
IM011Driver name too longSQLBrowseConnect
SQLDriverConnect
IM012DRIVER keyword syntax errorSQLBrowseConnect
SQLDriverConnect
IM013Trace file errorAll ODBC functions.
IM014Invalid name of File DSNSQLDriverConnect
IM015Corrupt file data sourceSQLDriverConnect