Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

When to use 'this.takeOwnershipOfTempTable(TempTable) ?

Posted on by 5,901

Hi All,

Can you please let me know when to use 'this.takeOwnershipOfTempTable(TempTable) ? i saw this code in SSRS report.

is it similar with TempTable.setConnection(this.parmUserConnection());

I mean to say both are executing same thing?

Please give me more shed on this.

Thanks!

*This post is locked for comments

  • Verified answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: When to use 'this.takeOwnershipOfTempTable(TempTable) ?

    Some reports when work with temp table only call setconnection() and that's probably enough. Some reports use takeOwnershipOfTempDBTable that calls internally setconnection and also calls takeOwnershipOfTempDBTable on the table buffer. xRecord.takeOwnershipOfTempDBTable is a system method, so who knows what it does, but anyway if it is there then why not to use it as well?

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: When to use 'this.takeOwnershipOfTempTable(TempTable) ?

    Ohh ok,

    Means when it's (takeOwnershipOfTempDBTable) execute it's internally called temp tabke.setconnection() only. But the main difference is, this method we can use only for Tabletype = TempDB.

    Is it correct?

  • Verified answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: When to use 'this.takeOwnershipOfTempTable(TempTable) ?

    It calls setConnection() so does what you say and also takeOwnershipOfTempDBTable system method on the table.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: When to use 'this.takeOwnershipOfTempTable(TempTable) ?

    Thanks ievgen

    it's create a separate DB connection for respective user? similar like tempTable.setConnection()

    please give me more shed on this.

    Thanks!

  • Verified answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: When to use 'this.takeOwnershipOfTempTable(TempTable) ?

    Whenever you use TempDB table in SSRS report you need to use this method, if you want to see what it does, just look at source code of it.

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans