ax 2012 : how to view select from query object

Hi,

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));

info(q.toString();o(q.toString());

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 ?

Thanks.

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

info(q.dataSourceNo(1).toString());

Thanks Martin,

Once again you solved my problem.