Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

(0) ShareShare
ReportReport
Posted on by 5,943

Dear All,

Can you please let me know in form datasource shall we use Temp Table both (InMemory and TempDB)?

Please give me more shed on this.

Thanks!

Arpan

*This post is locked for comments

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    Yes, both can be used as form data sources.

  • Karthickks Profile Picture
    Karthickks 100 on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    Hi @rp@n,

    What is the answer to this? 

    can we use in-memory table as a form DataSource or TempDB as a form DataSource? 

  • @rp@n Profile Picture
    @rp@n 5,943 on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    Thanks Martin

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    For InMemory tables.

    These things are explained on quite a few places, such as in Temporary Tables (AX 2012) on the Microsoft Dynamics AX Support blog. You can use search engines to find that by yourself.

  • @rp@n Profile Picture
    @rp@n 5,943 on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    Thanks Martin,

    So, when to use setTmpData() ?

    Please give me more shed on this.

    Thanks!

    Arpan

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    No, you must use linkPhysicalTableInstance() for TempDB tables instead of setTmpData().

    Use cross-references in AX or put the method name to a search engine if you want to see some examples.

  • @rp@n Profile Picture
    @rp@n 5,943 on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    Thanks Vilmos,

    Ohh...

    So, if required temp table then TempDB is Preferable right ?

    And to get data from InMemory or TempDB , we need to use

    TempTable.setTmpData(element.PopulateRecords())

    Please give me more shed on this.

    Thanks!

    Arpan

  • Verified answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    You can use it, but to populate values it takes additional computational time compared to just binding it to an actual table with a database fetch.

    Be aware that AX is not too great with passing inmemory temporary record buffers between server- and client-tier when you are about to bind the values to the datasource, I have seen odd behaviour when doing that some time ago.

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: Shall we use Temp Table (In Memory and Temp DB) both in Form datasource?

    You can use temporary tables as form datasources if needed.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans