itemChilds is the variable where I insert and update my records. I'm aware of what you said. Here's my work around that looks like the one from Sonny Wibawa Adi:

RecId firstRecId;

while select forupdate itemChilds {

           // Work around - Begin
           if (!firstRecId){
               firstRecId = itemChilds.RecId;
           } else {
               if (firstRecId == itemChilds.RecId) {
                   break;
               }
           }
           // Work around - End

           itemChilds.PriceUnit = (itemChilds.PriceUnit * ratio);
           itemChilds.update();
       }

Thanks for sharing you thoughts on this!

Steeve...

-----Message d'origine-----
De : bmp_thydatacenter_dk [mailto:[EMAIL PROTECTED] Envoyé : 13 novembre 2003 01:40
À : [EMAIL PROTECTED]
Objet : [development-axapta] Re: Updating temporary table


--- In [EMAIL PROTECTED], "Steeve 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:

You should be aware that each object (variable) defined with a temporary table as datatype has its own private file with data.


If you have one object (tmp1) which is used to insert records into the temporary table, you will not be able to fetch the records with another object (tmp2) even if you have used the same datatype.

If you want to share the contents of one temporary table between two objects, you can use the following statement (tmp1 is currently having the records):

tmp2.setTmpData(tmp1);

Best regards,
Bjørn Møller Pedersen
Thy Data Center Devlopment A/S
http://development.thydatacenter.dk/






Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





Yahoo! Groups Sponsor ADVERTISEMENT
click here


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to