Queryvalue Limit (?)

Does Ax2009 has a limit for queryvalue?

Sample code:

PurchLine purchLine;
str queryValue;
;
while select PurchId from purchLine
group by PurchId
where purchLine.FIELD1 like _projId
|| purchLine.FIELD2 like _projId
{
queryValue = queryValue + purchLine.PurchId + ‘,’;
}
return queryValue;

on return I have an error.

Tnanks

Hi

Yes, you are right to think that string variable cannot grow endlessly in AX.

If your string variable becomes bigger than 7 mb you will most likely hit the infamous insufficient memory error.

Also if you are planning to use the queryValue variable as some sort of filter in a query it might be more appropriate to use a join.

Regards,

Velislav