web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

queryRun.get(tablenum(xx)) question

(0) ShareShare
ReportReport
Posted on by 1,559

Hi Friends,

queryRun.get(tablenum(xx)) return a single record or a recordset?

If I want a recordset, what should I do? Since I need to store it for later use.

Thanks,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    239,660 Most Valuable Professional on at

    It returns a single record. You get another record by calling queryRun.next().

    You can either fetch records individually and store them somewhere, or you can simply save the query definition and run it later.

  • Ganriver1 Profile Picture
    1,559 on at

    Thanks Maritn,

    So, there is no recrodsetj/dataset in AX. If I want to store it, store it in Container?

  • Suggested answer
    Malcolm Burtt Profile Picture
    1,475 on at

    The queryRun object does return a dataset in quite that way but you could iterate over it and store each returned record into a RecordLinkList object (msdn.microsoft.com/.../recordlinklist.aspx) if you want to pass the whole result set around...or you could just pass the query and re-execute it.

  • Verified answer
    Martin Dráb Profile Picture
    239,660 Most Valuable Professional on at

    It depends. You can put it into a in-memory collection (RecordInsertList, List, etc.) if it's small enough, to a temporary table (in TempDB, in memory or on disk) or do anything else that makes sense in your particular scenario. Just be careful about not wasting resources, especially memory.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
Harisgillani Profile Picture

Harisgillani 4

#2
dekion Profile Picture

dekion 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans