smiles
1
Hi
I want to update the last line of a grid.
I’ve tried this
void clicked()
{
tmpaccountsum t;
;
t=tmpaccountsum_ds.getFirst(1,true)?tmpaccountsum_ds.getFirst(1,true):tmpaccountsum;
tmpaccountsum_ds.last();
ttsbegin;
while select forupdate t
{
t.Txt=“12545”;
t.update();
}
ttscommit;
tmpaccountsum_ds.research();
info(t.Txt);
super();
}
can you help please ??
In your code it will not go into the while loop- because you have created table buffer which will initially not have any recid…
I think you are trying to update only the last record of the grid in a form…
If so, don’t use a while statement.
LedgerTable_ds.last();
ttsBegin;
select forupdate ledgerTable;
ledgerTable.AccountName = “how are u”;
ledgerTable.update();
ttsCommit;
smiles
3
Tahnk you that resolved the problem :))))))))