SQLGetDiagField
Full Description
swirl
Syntax
  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:

  • StringLength. The returned size of the DiagInfo buffer.

Copyright © OmniMark Technologies Corporation, 1988-1998.