Sunday, January 13, 2008

Change Tables SystemFields

MyTable xyz;
SystemSequence obj;
;
obj = new SystemSequence();
obj.SuspendRecIDs(tablenum(MyTable));
MyTable.overwriteSystemFields(TRUE); // dont know if this is required
MyTable.clear;
// Important is not use the fieldname directly to avoid compile error.
MyTable.( fieldname2id( TableNum(MyTable), "RecId") ) = 1111;


...
MyTable.insert;
obj.removeRecIDSuspension(tablenum(MyTable));

Denis Macchinetti

Ciao a Tutti