ODBCThreadResult

ODBCThreadResult — the results of an SQL command.

Synopsis

class ODBCThreadResult
{
    Result;        // The SQL result set, or nil.
    KeyResult;     // The SQL result set describing the primary
                   // keys, for those commands that produce a
                   // primary key set.
    Diagnostic;    // The complete ODBC diagnostic set, if any.
    KeyDiagnostic; // The diagnostic set for the primary key query.
    Description;   // A description of the command or result.
    ReturnCode;    // A numeric SQLRESULT for an SQL command, or an
                   // "errno" return code for a file system error.
    AffectedRows;  // The number of affected rows for an SQL command,
                   // if available.
}
    

Description

The Diagnostic and KeyDiagnostic each consist of an array, where the elements of the array are themselves arrays:

    element[0] = the database diagnostic message, as a string.

    element[1] = the ODBC diagnostic state code, as a string.

    element[2] = the ODBC native error code, as a number.

There can be more than one diagnostic message returned by a single SQL call.

The Result and KeyResult contain the column and row definitions resulting from an SQL command. This definition is shared with the single-threaded ODBC implementation. The complete definition for ODBCResultis:

class ODBCResult
{
    columns;
    rows;
}

The columns member is an array of instances of the ODBCColumn class:

class ODBCColumn
{
    columnsize;     // A numeric column width.
    datatype;       // A number representing the ODBC data type.
    decimaldigits;  // The number of decimal digits, or 0.
    name;           // The column name.
    nullable;       // 0 if not nullable, 1 if nullable.
}

The rows member is an array of values, each of which corresponds to the column definition in the same position in the columns array.