title: Get records from AX with pagination [AX 2009]
body: <p>I am trying to get a certain number of records at a time from AX. 
  I want to perform something equivalent to:</p>
  
  <pre><code>SELECT * FROM (SELECT *, ROW_NUMBER() AS ROWNO
  FROM TableName) 
      AS TableName WHERE ROWNO &gt; startIndex 
  AND ROWNO &lt;= endIndex;
  </code></pre>
  
  <p>Currently, I am fetching all records from AX (using .net business connector) :</p>
  
  <pre><code>axRecord.ExecuteStmt("select * from %1");
  i = 0;
  while(axRecord.Found)
  {
   if(i&lt;startIndex)
   {
    i++;
    continue;
   }
   // Perform operations
   i++;
   if(i==endIndex)
   {
     break;
   }
  }
  </code></pre>
  
  <p>Is there is a better way to do this using Business connector only?  Kindly help</p>