DF_FILE_TOUCHED
See Also: Get_Attribute, Set_Attribute
Indicates whether the table has been affected by the last relate or reread.
Level
Table
Supported by
All Drivers
Type
Enumeration list, temporary
Access
Read Only
Values
DF_FILE_NOT_TOUCHEDDF_FILE_TOUCHED_INACTIVEDF_FILE_TOUCHED_ACTIVE
Remarks
DF_FILE_TOUCHED is DF_FILE_NOT_TOUCHED if the table was not involved in the last reread or relate. It is DF_FILE_TOUCHED_INACTIVE if the table was involved in the last reread or relate, and its record buffer is inactive. It is DF_FILE_TOUCHED_ACTIVE if a table was involved in the last reread or relate and its record buffer is active.
The DF_FILE_TOUCHED attributes of open tables are updated when a relate or reread operation occurs. This update does not take place when using the reread command with arguments! There are two ways to use the reread command: without arguments and with arguments. Although it is the same command that is used, its implementation is different.
Procedure ShowTouched
Handle hTable
String sTable
Integer iTouched
Move 0 To hTable
Repeat
Get_Attribute DF_FILE_NEXT_OPENED Of hTable To hTable
If (hTable > 0) Begin
Get_Attribute DF_FILE_LOGICAL_NAME Of hTable To sTable
Get_Attribute DF_FILE_TOUCHED Of hTable To iTouched
Case Begin
Case (iTouched = DF_FILE_NOT_TOUCHED)
Showln sTable " NOT touched."
Case Break
Case (iTouched = DF_FILE_TOUCHED_INACTIVE)
Showln sTable " touched INACTIVE."
Case Break
Case (iTouched = DF_FILE_TOUCHED_ACTIVE)
Showln sTable " touched ACTIVE."
Case Break
Case End
End
Until (hTable = 0)
End_Procedure // ShowTouched
Procedure ManipulateTouched
Open Salesp
Open Customer
Open Invt
Open Vendor
Open OrderHea
Open OrderDtl
Clear OrderHea
Find Gt OrderHea By 1
If (Found) Begin
Relate OrderHea
Showln "The touched status of the open buffers after Relate OrderHea:"
Send ShowTouched
End
Find Gt OrderDtl By 1
Reread OrderDtl
Unlock
Showln
Showln "The touched status of the open buffers after Relate OrderHea,"
Showln "a find on OrderDtl and then a reread with argument:"
Send ShowTouched
Reread
Unlock
Showln
Showln "The touched status of the open buffers after Relate OrderHea,"
Showln "a find on OrderDtl and then a reread without argument:"
Send ShowTouched
End_Procedure // ManipulateTouched
The procedure above shows the touched status after a relate, a reread with arguments, and a reread without arguments.