Library /sys$common/syshlp/SQL$HELP72.HLB  —  Routines  sql_get_message_vector
    Retrieves information from the message vector about the status of
    the last SQL statement.

1  –  Format

    sql_get_message_vector (addr, index)

2  –  Returns

    No value returned.

3  –  Arguments

3.1  –  addr

    Address of a variable into which the requested vector element
    will be written.

    Value:         Address of the variable declared to receive the
                   vector element
    Data type:     longword (32 bit)
    Passing        By reference
    mechanism:

3.2  –  index

    The index value of the vector element to return.

    Value:         A value greater than or equal to 1 and less than
                   or equal to 20
    Data type:     Unsigned longword
    Passing        By value
    mechanism:

    The following table shows the index values and how they map to
    vector elements and the information contained in each vector
    element.

    Index
    Value Information Returned

    1     Number of arguments in the vector
    2     Primary status code of the last SQL statement
    3     Number of FAO arguments to primary message
    4-20  Return status for follow-on messages, if any

4  –  Description

    Use the sql_get_message_vector routine to retrieve information
    from the RDB$MESSAGE_VECTOR array. The array provides information
    about the execution status of SQL statements. Index 2 of the sql_
    get_message_vector routine returns the primary status code of
    the last SQL statement. This index is comparable to the SQLCODE
    status parameter.

    The ANSI/ISO SQL standard does not include the sql_get_message_
    vector routine or the RDB$MESSAGE_VECTOR array. For application
    programs that comply with the standard, use the SQLCODE or
    SQLSTATE status parameters. Furthermore, the status values
    returned for a particular condition may change in future versions
    of Oracle Rdb.

    The status values that are stored in the message vector are
    intended to be supplementary information to the status parameters
    SQLCODE and SQLSTATE. Use the sql_get_message_vector routine if
    the information provided by SQLCODE or SQLSTATE is ambiguous and
    your application needs a more specific error code to handle the
    error condition.

    Relationship Between sql_message_vector and RDB$MESSAGE_VECTOR
    shows the relationship between the indexes returned by sql_
    message_vector and the fields in RDB$MESSAGE_VECTOR.

    Table 1-1 Relationship Between sql_message_vector and
              RDB$MESSAGE_VECTOR

    sql_message_vector
    Indexes                     RDB$MESSAGE_VECTOR Fields

    Index 1                     RDB$LU_NUM_ARGUMENTS
    Index 2                     RDB$LU_STATUS
    Index 3                     RDB$LU_ARGUMENTS
    Index 4-20                  Return status for follow-on messages,
                                if any

5  –  Related Routines

    None.
Close Help