Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

determine no of fields retrieved by AOT query

Posted on by 11,871

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,871 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 225,588 Super User 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,871 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 225,588 Super User 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,871 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 225,588 Super User 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,417 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,871 on at
    RE: determine no of fields retrieved by AOT query

    It is an AOT query

  • maram fraij Profile Picture
    maram fraij 11,871 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,417 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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans