Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

how to put all the records of a temp Table into a container ?

(0) ShareShare
ReportReport
Posted on by 3,175

Hi, i need to pack all the records of a temp table into a container.

I need this so that i can unpack and create temp table on another tier (client).

Thank you

Santosh.

*This post is locked for comments

  • 5400 Profile Picture
    7,162 on at
    RE: how to put all the records of a temp Table into a container ?

    Hi Martin,

    yes, Just i provide the method because tmpTable won't work with .setTmp(). if he needs to to carry the data in different instance, he should use above function.

    Thanks

    Bhaskar

  • Martin Dráb Profile Picture
    233,025 Most Valuable Professional on at
    RE: how to put all the records of a temp Table into a container ?

    linkPhysicalTableInstance() doesn't pack or send anything - it merely connects an AX buffer (X++ variable) with a table instance in TempDB database.

  • 5400 Profile Picture
    7,162 on at
    RE: how to put all the records of a temp Table into a container ?

    all the records means there is no limit. if you want to take it in container, it could give overflow in some scenario when data will be huge. It is not a good practice. so if your code in client tier if you are using im-memory table, it should not pass as argument in server tier. Please make the table property tempDb and use it in server tier for unpack.

    use  tmpTable.linkPhysicalTableInstance(table) to pack it and send.

  • Verified answer
    Martin Dráb Profile Picture
    233,025 Most Valuable Professional on at
    RE: how to put all the records of a temp Table into a container ?

    If you use a TempDB temporary table, it exists neither on client nor on AOS - it's in TempDB database on database server. What you're talking about makes sense for InMemory tables only.

  • San Artham Profile Picture
    3,175 on at
    RE: how to put all the records of a temp Table into a container ?

    Bhaskar, i would want pack all the records not just one.

    Martin, even in the case of TempDB table, isn't it better pack it in a container  and unpack it another tier instead passing it by Ref ?

    Regards

    Santosh.

  • 5400 Profile Picture
    7,162 on at
    RE: how to put all the records of a temp Table into a container ?

    again you have to do common = con2buf(container) after passing to server site.

  • Martin Dráb Profile Picture
    233,025 Most Valuable Professional on at
    RE: how to put all the records of a temp Table into a container ?

    Why don't you simply use a TempDB temporary table?

    What you're trying to do sounds like wasting of resources to me.

  • 5400 Profile Picture
    7,162 on at
    RE: how to put all the records of a temp Table into a container ?

    take temp table data in common buffer.

    buffer2con(common)

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,283 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans