I have the same problem before, but mine is not a temporary table. I have no idea why this can be happenned, maybe it's a bug in AXAPTA.I solve the problem by modify the code like this: int arrRecId [,1]; int swTot = 0; LedgerJournalTrans swTrans; ; select count(recId) from swTrans where swTrans.JournalNum == swJournalId; b = swTrans.RecId;
while select forupdate swTrans where swTrans.JournalNum == swJournalId
{
if (arrRecId [swTrans.RecId] != swTrans.RecId)
{
arrRecId [swTrans.RecId] = swTrans.RecId;
swTot++;
}
else
{
if (swTot >= b)
break;
}
//... process
}
Sonny Wibawa AdiSteeve Gilbert <[EMAIL PROTECTED]> wrote:
itemChilds is a temporary table. I want to modify and update every record in it so I thought the following code would do the job:
BOACF20_USCustomsLine itemChilds; Real ratio = 1.1; //Or whatever else
while select forupdate itemChilds {
itemChilds.PriceUnit = (itemChilds.PriceUnit * ratio);
itemChilds.update();
}I have 4 records in this table but this code keeps on looping on the same 4 record. I think it stops when the field PriceUnit is full (huge number). Because when I go in debug mode, it keeps on looping and when I'm in "normal" mode the report is displayed with "*******************" where the value would be. Don't worry, I've got plenty of space to display the value. If I remove "itemChilds.update();", the loop browse every record once and exit, but this way I can't update the field.
Got an idea? Thanks.
Steeve...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
_____
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
Yahoo! Groups Sponsor ADVERTISEMENT
Click to learn more...
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

