contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
function   SQLGetDiagField    
  Related Syntax     Other Library Functions  

Library: ODBC
Include: omodbc.xin
Returns: Numeric

An SQL return code. The following values may be returned:

  • SQL_SUCCESS (the current field values).
  • SQL_SUCCESS_WITH_INFO (the current field values, but a message was issued).
  • SQL_ERROR (an error occurred).
  • SQL_INVALID_HANDLE (the handle is invalid).
  • SQL_NO_DATA (no data is available).

Declaration

  define external counter function SQLGetDiagField
     (  value counter HandleType,
        read-only SQL_handle_type Handle,
        value counter RecNumber,
        value counter DiagIdentifier,
         read-only SQL_vector_type DiagInfo,
        value counter BufferLength,
        modifiable counter StringLength )


Purpose

Returns the current value of a record field of the diagnostic data structure (associated with a specified handle) that contains error, warning, and status information.

Input arguments:

  1. HandleType. The type of handle for which diagnostics are required. The following values are allowed:
    • SQL_HANDLE_ENV
    • SQL_HANDLE_DBC
    • SQL_HANDLE_STMT
    • SQL_HANDLE_DESC
  2. Handle. A handle for the diagnostic data structure, of the type indicated by HandleType. If the handle type is SQL_HANDLE_ENV, the handle can be either a shared or an unshared environment handle.
  3. RecNumber. Indicates the status record from which the application seeks information. Status records are numbered from one (1). If the DiagIdentifier argument indicates a header field, RecNumber is ignored.
  4. DiagIdentifier. Indicates the field of the diagnostic whose value is to be returned. The following values are allowed:
    • SQL_DIAG_RETURNCODE
    • SQL_DIAG_NUMBER
    • SQL_DIAG_ROW_COUNT
    • SQL_DIAG_SQLSTATE
    • SQL_DIAG_NATIVE
    • SQL_DIAG_MESSAGE_TEXT
    • SQL_DIAG_DYNAMIC_FUNCTION
    • SQL_DIAG_CLASS_ORIGIN
    • SQL_DIAG_SUBCLASS_ORIGIN
    • SQL_DIAG_CONNECTION_NAME
    • SQL_DIAG_SERVER_NAME
    • SQL_DIAG_DYNAMIC_FUNCTION_CODE
    • SQL_DIAG_ALTER_TABLE
    • SQL_DIAG_CREATE_INDEX
    • SQL_DIAG_CREATE_TABLE
    • SQL_DIAG_CREATE_VIEW
    • SQL_DIAG_DELETE_WHERE
    • SQL_DIAG_DROP_INDEX
    • SQL_DIAG_DROP_TABLE
    • SQL_DIAG_DROP_VIEW
    • SQL_DIAG_DYNAMIC_DELETE_CURSOR
    • SQL_DIAG_DYNAMIC_UPDATE_CURSOR
    • SQL_DIAG_GRANT
    • SQL_DIAG_INSERT
    • SQL_DIAG_REVOKE
    • SQL_DIAG_SELECT_CURSOR
    • SQL_DIAG_UNKNOWN_STATEMENT
    • SQL_DIAG_UPDATE_WHERE
    • SQL_DIAG_CURSOR_ROW_COUNT
    • SQL_DIAG_ROW_NUMBER
    • SQL_DIAG_COLUMN_NUMBER
  5. DiagInfo. The returned diagnostic information. The data type depends on the value of DiagIdentifier.
  6. BufferLength. The size of the DiagInfo buffer.

Output argument:

    Related Syntax
   SQLGetDiagRec
 
  Other Library Functions
   SQL_FUNC_EXISTS
   SQL_LibraryVersion
   SQLAllocConnect
   SQLAllocEnv
   SQLAllocHandle
   SQLAllocStmt
   SQLBindCol
   SQLBindParameter
   SQLBrowseConnect
   SQLBulkOperations
   SQLCancel
   SQLCloseCursor
   SQLColAttribute
   SQLColAttributes
   SQLColumnPrivileges
   SQLColumns
   SQLConnect
   SQLCopyDesc
   SQLDataSources
   SQLDescribeCol
   SQLDescribeParam
   SQLDisconnect
   SQLDriverConnect
   SQLDrivers
   SQLEndTran
   SQLError
   SQLExecDirect
   SQLExecute
   SQLExtendedFetch
   SQLFetch
   SQLFetchScroll
   SQLForeignKeys
   SQLFreeConnect
   SQLFreeEnv
   SQLFreeHandle
   SQLFreeStmt
   SQLGetArrayAsCounter
   SQLGetArrayAsCounterShelf
   SQLGetArrayAsStream
   SQLGetArrayAsStreamShelf
   SQLGetArrayAsString
   SQLGetArrayElementCount
   SQLGetArrayElementLen
   SQLGetConnectAttr
   SQLGetConnectOption
   SQLGetCursorName
   SQLGetData
   SQLGetDescField
   SQLGetDescRec
   SQLGetDiagField
   SQLGetDiagRec
   SQLGetEnvAttr
   SQLGetFunctions
   SQLGetInfo
   SQLGetStmtAttr
   SQLGetStmtOption
   SQLGetTypeInfo
   SQLGetVectorAsCounter
   SQLGetVectorAsStream
   SQLGetVectorAsString
   SQLGetVectorSize
   SQLMoreResults
   SQLNativeSQL
   SQLNumParams
   SQLNumResultCols
   SQLParamOptions
   SQLPrepare
   SQLPrimaryKeys
   SQLProcedureColumns
   SQLProcedures
   SQLPutData
   SQLRowCount
   SQLSetArrayAsCounter
   SQLSetArrayAsCounterShelf
   SQLSetArrayAsStream
   SQLSetArrayAsStreamShelf
   SQLSetArrayAsString
   SQLSetArraySize
   SQLSetConnectAttr
   SQLSetConnectOption
   SQLSetCursorName
   SQLSetDescField
   SQLSetDescRec
   SQLSetEnvAttr
   SQLSetPos
   SQLSetScrollOptions
   SQLSetStmtAttr
   SQLSetStmtOption
   SQLSetVectorAsCounter
   SQLSetVectorAsStream
   SQLSetVectorAsString
   SQLSetVectorSize
   SQLSpecialColumns
   SQLStatistics
   SQLTablePrivileges
   SQLTables
   SQLTransact
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:18 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.