Property Integer Current_Record
Read Access: | Get Current_Record to IntegerVariable |
Current_Record is the number of the record most recently retrieved from the database. This value becomes zero after a buffer clear, and so is always zero at the time of saving a new record. Edited records, however, retain the value of this property throughout editing.
Current_Record only works with tables that support a recnum column. As of DataFlex revision 11, the use of Current_Record is no longer recommended. If you wish to determine the status of a DDO you can use HasRecord. If you need the actual record identity of a record, you should use CurrentRowId. These messages are more flexible because they will work with both recnum and standard tables.
The following two code segments show a legacy use of Current_Record and how it can be replaced with HasRecord
// legacy method for determining if a record exists Integer iCurrentRecord Get Current_Record of hoDDO to iCurrentRecord If (iCurrentRecord>0) Begin : End // Preferred method for determining if a record exists Boolean bHasRecord Get HasRecord of hoDDO to bHasRecord If bHasRecord Begin : End
The following two code segments show a legacy use of Current_Record and how it can be replaced with CurrentRowId
// legacy method for working with a record Integer iCurrentRecord Get Current_Record of hoDDO to iCurrentRecord Send AddRecordToList iCurrentRecord // Preferred method for determining if a record exists RowId riRecord Get CurrentRowid of hoDDO to riRecord Send AddRecordToList riRecordSee Also