Issue encountered where a query exceeded the Buffer Size. Error reported as
Statement too long and AX suggests increasing the size of the buffer in the AOS
database configuration tab.
The default for this buffer is 24K and most documentation suggests if there is a need to increase the size of this buffer as a result of either a query or select statement that is should only be increased by small increments.
However, there is an alternative method of resolving this and that is to use the forceLiterals attribute/property. To do this on a AX query, set the Literal property of the query from Default to forceLiteral. If the issue arises on a AX X++ select statement then use the keyword forceliterals eg
You are advised not to use the forceLiterals keyword in X++ select statements, because it could expose code to an SQL injection security threat.
The default for this buffer is 24K and most documentation suggests if there is a need to increase the size of this buffer as a result of either a query or select statement that is should only be increased by small increments.
However, there is an alternative method of resolving this and that is to use the forceLiterals attribute/property. To do this on a AX query, set the Literal property of the query from Default to forceLiteral. If the issue arises on a AX X++ select statement then use the keyword forceliterals eg
select forceliterals custtable;
Note
You are advised not to use the forceLiterals keyword in X++ select statements, because it could expose code to an SQL injection security threat.
No comments:
Post a Comment