=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Command: REREAD {fileNum|logicalName}*n Description: Locks all files and then re-finds the current record in each file specified as an argument to the command. If no files are specified, then all files are reread. Parameters: logicalName: The name used to identify the file in a DataFlex program. fileNum: The number used to open the file. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= see Old_open command for notes on this removal #COMMAND OLD_REFRESH T // Re-find all files listed by record identity #CHECK !1.RECNUM _RUWG !A [] $C0 !1.RECNUM |CI2 // FIND command !A [FINDERR] $047 |CI25 |CS"!1" // ERROR command #IF !0>1 OLD_REFRESH !2 !3 !4 !5 !6 !7 !8 !9 #ENDIF #ENDCOMMAND see Old_open command for notes on this removal #COMMAND OLD_REREAD #IF !0=0 !A [] $0C9 // REREAD command #ELSE !A [] $0C7 // LOCK command [MULTIUSER] OLD_REFRESH !1 !2 !3 !4 !5 !6 !7 !8 !9 #ENDIF #ENDCOMMAND private. Does a reread for passed file using GetRowId function
// This supports both Indirect_file and Indirect_file.Recnum #IFSAME !1.FILE_NUMBER |FS0,0& |FN0,0& |FD0,0& |FS0,0&.RECNUM // if someone is doing a Reread and passing indirect_file, then they need to support recnum // tables. This technique is not recommended and I doubt if anyone is actually doing this! !A [] $CC |CI0 |CI2 #ELSE // the old api_refresh used index_number this so we can safely use this variable (it is not used) #IFCLASS !1 SNDIECWVF Move (FindByRowId(!1,GetRowId(!1))) to Index_number #ELSE DECLARE_DATAFILE !1 Move (FindByRowId(!1.FILE_NUMBER,GetRowId(!1.FILE_NUMBER))) to Index_number #ENDIF #ENDIF