I followed this thread how to update a temporary table? however I got an error “Cannot edit a record in TableName.
The record has never been selected”.
Any wrong with the code below?
tmpCheckVoucher.setTmpData(report);
ttsBegin;
while select * from tblTransaction
where tblTransaction.TranId == KeyId
{
select forupdate tmpCheckVoucher where tmpCheckVoucher.LedgerAccount == tblTransaction.accountDisplay();
tmpCheckVoucher.Field1 = enum2str(tblTransaction.AccountType);
tmpCheckVoucher.Field2 = tblTransaction.accountDisplay();
tmpCheckVoucher.Field3 = tblTransaction.accountName();
tmpCheckVoucher.doUpdate();
}
ttsCommit;