RE: Difference between DoUpdate and table.SkipDataMethods()
Hi Gildo
Nikolaos and Blue have already supplied the answer. I'd just like to add on.
To clarify - you are asking whether the following methods will behave the same:
//DirPartyTable has update() overridden, so it is a decent example
class AnotherDayInTheOffice()
{
static void versionOne(DirPartyTable _party)
{
_party.Name = "New name";
_party.doUpdate();
}
static void versionTwo(DirPartyTable _party)
{
_party.Name = "New name";
_party.skipDataMethods(true);
_party.update();
}
}
I'm not 100% sure - they should be. But then the methods have different origins and are used in different scenarios.
I think your confusion/question will be cleared if you read up about set based SQL operations. A good example will be the class LedgerCovSetBased - lines 55 through 101.
The Common.skip#####() methods exist to enable developers to write set based SQL operations that actually work. If you write some piece of set based operation code to improve the performance of operation X, your work can be nullified if some user decides to enable DB tracking on your table or maybe some other developer writes an extension on your update/insert/delete method (which was empty). And then the doUpdate/doDelete/doInsert methods probably exist from the beginning of time - you know about them.
So if you want to skip the code in DirPartyTable.update(), then you should call DirPartyTable.doUpdate(). If you want to update millions of DirPartyTable records and find a way to do it with update_recordset, then you should call DirPartyTable.skipDataMethods().