Skip to content

DF_FILE_COMMITTED

See Also: Get_Attribute, Set_Attribute

Indicates whether the last end_transaction was successful on the table.

Level

Table

Supported by

All Drivers

Type

Numeric, temporary

Access

Read Only

Values

  • True
  • False

Remarks

When a table is opened, its DF_FILE_COMMITTED attribute will be set to true. The Begin_Transaction command will set the attribute to false for every open table. The End_Transaction command will set the attribute for every open table to true when successful.

If a file's DF_FILE_TRANSACTION attribute has a value of DF_FILE_TRANSACTION_NONE, then the file's DF_FILE_COMMITTED attribute will always have a value of True.

This attribute will rarely be used. To find out if a transaction was successful, use the DF_TRANSACTION_ABORT attribute.

Procedure ShowUncommitted
    Handle hTable
    Boolean bCommitted
    Boolean bAborted
    String sTable

    Get_Attribute DF_TRANSACTION_ABORT To bAborted
    If (bAborted) Begin
        Showln "Tables that are uncommitted are:"
        Move 0 To hTable
        Repeat
            Get_Attribute DF_FILE_NEXT_OPENED Of hTable To hTable
            If (hTable > 0) Begin
                Get_Attribute DF_FILE_COMMITTED Of hTable To bCommitted
                If (Not(bCommitted)) Begin
                    Get_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
                    Showln "    " sTable
                End
            End
        Until (hTable = 0)
    End
End_Procedure // ShowUncommitted

The sample procedure above shows a list of tables that have their DF_FILE_COMMITTED attribute set to false.