Thursday, August 11, 2011

Check if record has been changed

there are times when you want to check if a table has been touched
before you do a process such as a refresh. here is code that can be
placed in a table to check whether any data in the record set has been
changed


boolean hasChanged()
{
SysDictTable sysDictTable;
int f;
fieldId fieldId;
;

sysDictTable = new SysDictTable(this.TableId);

for (f = 1; f <= sysDictTable.fieldCnt(); f++)
{
fieldId = sysDictTable.fieldCnt2Id(f);

if (this.orig().(fieldId) != this.(fieldId))
return true;
}
return false;
}

No comments:

Post a Comment