Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Loosing buffer after while select

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I was debugging one of my project and found this case :

while select MyTable
{
// do some stuff
}

if (MyTable.RecId)// this statement is used to check if I go through my while select loop once
{
// Never hit this point, buffer is lost
}


The problem is i'm loosing the buffer right after my while select loop (MyTable is NOT empty, and I'm going well through the loop). I'm pretty sure I've already used this synthax and it's worked. Is there any explanation viable ?

Thank you in advance.

PS : I bypass my problem with a flag but I want to understand what's happening here, why my buffer is lost

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Loosing buffer after while select

    Ok, my bad so, thank you for answer.

  • Verified answer
    Kurt Warner Profile Picture
    Kurt Warner 155 on at
    RE: Loosing buffer after while select

    The table buffer instance is only in scope for the loop.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,466 Most Valuable Professional on at
    RE: Loosing buffer after while select

    What you see is the expected behavior.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans