Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

determine no of fields retrieved by AOT query

Posted on by 11,873

I have an inquiry screen displays data from so many tables  so I create an AOT query to retrieve the required data I restrict no  of fields retrieved by each data source  but I still face the below error when I try to open the inquiry screen . when I check the displayed query by the error I find it retrieves all fields per each data source even the fields that are not selected , how can I restrict the fields selected by the query performed by AOT query ?  

[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot create a row of size 8099 which is greater than the allowable maximum row size of 8060.

  • maram fraij Profile Picture
    maram fraij 11,873 on at
    RE: determine no of fields retrieved by AOT query

    Does it include "some fields that are not selected" (as you're saying now) or "all fields" (as you said originally)? If just some, can you give us an example? // It retrieves all data source fields including the fields that are not selected under the data source , I think now the statement is more accurate

    I will try it to simple query using one table as data source  

  • Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    RE: determine no of fields retrieved by AOT query

    Does it include "some fields that are not selected" (as you're saying now) or "all fields" (as you said originally)? If just some, can you give us an example?

    It's unlikely that the whole feature is completely broken, therefore you're probably looking at a special case. But to be sure, can you please try it with a simply query using a single standard table? If it works there but not in your query, we'll need more information about your query. But before that, try reducing the query to the simplest scenario still demonstrating the problem.

    Which version of AX are you using?

  • maram fraij Profile Picture
    maram fraij 11,873 on at
    RE: determine no of fields retrieved by AOT query

    After setting Dynamic property to No, correct?   YES

    You can check the generated pseudo-SQL code by looking into the debugger or calling toString() method on the main data source. YES I did , and compare both queries ( the one from  Dynamic property  Yes ) they are identical and I  face same error in both cases  even that the one with Dynamic property to  has a few fields and I notice that the query retrieves some fields that are not selected selected under their data source  

  • Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    RE: determine no of fields retrieved by AOT query

    After setting Dynamic property to No, correct?

    You can check the generated pseudo-SQL code by looking into the debugger or calling toString() method on the main data source.

  • maram fraij Profile Picture
    maram fraij 11,873 on at
    RE: determine no of fields retrieved by AOT query

    This is done by determine a few numbers of fields per each data source ( the ones that I need their data in the inquiry screen)  in the query instead of selecting  all fields

  • Martin Dráb Profile Picture
    Martin Dráb 230,149 Most Valuable Professional on at
    RE: determine no of fields retrieved by AOT query

    You said that you restricted the number of fields but the restriction doesn't work. Before we can say what you did wrong, you'll have to tell us how you tried to restrict the number of fields.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: determine no of fields retrieved by AOT query

    I don't think there is any way you can control the number of fields in the query at runtime. How many columns are you trying to fetch using the query?

  • maram fraij Profile Picture
    maram fraij 11,873 on at
    RE: determine no of fields retrieved by AOT query

    It is an AOT query

  • maram fraij Profile Picture
    maram fraij 11,873 on at
    RE: determine no of fields retrieved by AOT query

    No it is in the same database

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,421 on at
    RE: determine no of fields retrieved by AOT query

    Hi Maram,

    The error is regarding the number of rows. Are you writing the queried data into another database?

    Please check this link as well.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans