ax 2012 : how to view select from query object


I want to see the resulting select of a query that is store in the AOT.

I tried the foillowing code;

Query q =

new Query(queryStr(REG_CarnetCommande));


But the resulting string is : "Query REG_CarnetCommande object 2bd2e480"

Get the same result in the value of the watch in the debug.

I want to copy paste the result into SQL server.

Anybody knows how i can get the resulting select ?


You won’t get exactly a T-SQL query, but you can fix your code by this:


Thanks Martin,

Once again you solved my problem.