我试图一次从 AX 获取一定数量的记录。我想执行相当于:
SELECT * FROM (SELECT *, ROW_NUMBER() AS ROWNO
FROM TableName)
AS TableName WHERE ROWNO > startIndex
AND ROWNO <= endIndex;
目前,我正在从 AX 获取所有记录(使用 .net 业务连接器):
axRecord.ExecuteStmt("select * from %1");
i = 0;
while(axRecord.Found)
{
if(i<startIndex)
{
i++;
continue;
}
// Perform operations
i++;
if(i==endIndex)
{
break;
}
}
仅使用业务连接器是否有更好的方法来做到这一点?请帮助