SysDatabaseTransDeleteについてのメモ
●処理の抜粋
■トランザクション系のテーブルに対する処理
(TableGroup::Transaction、
TableGroup::WorksheetHeader、
TableGroup::WorksheetLine、のテーブル)
switch(sysDictTable.id())
{
case tablenum(CustCollectionLetterLine):
case tablenum(InventDim):
case tablenum(DocuRef):
case tablenum(DirECommunicationAddress) :
case tablenum(DirPartyAddressRelationship) :
case tablenum(DirPartyAddressRelationshipMapping) :
case tablenum(DirPartyECommunicationRelationship) :
case tablenum(DirPartyRelationship) :
break;
case tablenum(WMSLocationSum):
while select forupdate wmsLocationSum
where wmsLocationSum.FreePalletCount != wmsLocationSum.MaxPalletCount
{
wmsLocationSum.FreePalletCount = wmsLocationSum.MaxPalletCount;
wmsLocationSum.CurrentPalletCount = 0;
wmsLocationSum.update();
}
break;
default:
this.deleteTable(sysDictTable);
break;
}
※一番上のケース文 ”以外” のテーブルが削除。
また、WMSLocationSumテーブルは、更新される。
■トランザクション以外のテーブルに対する処理
switch(sysDictTable.id())
{
case tablenum(SalesTable):
case tablenum(PurchTable):
case tablenum(WMSPallet):
case tablenum(CustInterestJour):
case tablenum(CustCollectionLetterJour):
case tablenum(ProjControlPeriodTable):
case tablenum(ProjInvoiceJour):
case tablenum(ProjJournalTable):
this.deleteTable(sysDictTable);
default:
break;
}
※上記のケース文のテーブルが削除される。
●結論
以下のようになっています。
■確実に削除されるテーブル
SalesTable
PurchTable
WMSPallet
CustInterestJour
CustCollectionLetterJour
ProjControlPeriodTable
ProjInvoiceJour
ProjJournalTable
■絶対に削除されないテーブル
CustCollectionLetterLine
InventDim
DocuRef
DirECommunicationAddress
DirPartyAddressRelationship
DirPartyAddressRelationshipMapping
DirPartyECommunicationRelationship
DirPartyRelationship
■条件次第で削除されるテーブル
TableGroup::Transaction、
TableGroup::WorksheetHeader、
TableGroup::WorksheetLine
が指定してあるテーブルは削除される。
※WMSLocationSumテーブルは、更新される
最終更新:2012年06月20日 15:18