Class: Record
Description
This method compares two objects of the same Record class. It reports, by column name, the differences between the two objects. Comparisons only report on main fields, not sub-fields. The ResultSet has the following columns:
COLUMNNAME, OLDVALUE, NEWVALUE
This method is useful, for example, when determining everything that is affected by a particular transaction.
|
This method does not compare memo fields. |
Syntax
oldRecord.compare(Record newRecord)
Parameters
newRecord |
A Record object of the same class. |
Returns
A ResultSet containing the differences between the two Record objects.
When Became Available
Profile v7.0
Example
type String colname,newval,oldvalue
type ResultSet rs = depbefor.compare(.depafter(CID))
while rs.next() do {
set colname = rs.getCol("COLUMNNAME")
set oldvalue = rs.getCol("OLDVALUE")
set newval = rs.getCol("NEWVALUE")
do something....
}