title: unknown isc error 0 on Delphi XE TClientDataSet.Next
body: <p>I have a DBXpress data structure connected to a Firebird database. I'm adding data pagination over a ClientDataSet, DataSetProvider and SQLQuery combination.
  It was working well but recently it started to raise <code>unknown isc error 0 exception</code> after calling Next many times.</p>
  
  <p>The pagination code is:</p>
  
  <pre><code>if not ClientDataSet.Active then
      ClientDataSet.Open;
  RecNo := ClientDataSet.RecNo; // Keep track of selected record
  ClientDataSet.DisableControls;
  LastRecNo := GetLastRecNo;
  if LastRecNo &gt; -1 then
  begin
      ClientDataSet.RecNo := LastRecNo;
      ClientDataSet.Next;
      while (not ClientDataSet.Eof) and (Result &lt; DATA_PAGE_SIZE) do
      begin
           ...
           ClientDataSet.Next; // The exception is raised here
           Inc(Result);
      end;
  end;
  ClientDataSet.RecNo := RecNo;
  ClientDataSet.EnableControls;
  </code></pre>
  
  <p>The exception in intermittently raised, it could mean a connection issue, but the database is stored locally, the connection string is something like <code>localhost:C:\Path\Base.FDB</code>.</p>
  
  <p><strong>EDIT:</strong> This code is fired when user scrolls down the mouse, move down the scroll bar or navigates to the items that are next to the end of the list. On recent tests I've discovered the exception is only raised if the code is executed normally. If there is a break-point, or if I put there some sleeps, it executes normally. 
  I'm also sure I don't have any other thread changing the ClientDataSet.</p>