title: Cannot perform this operation on a closed dataset: Delphi XE4 error with Firebird 2.5.2
body: <p>I have following code in Delphi 7 as well as in Delphi XE4. I am migrating my code from Delphi 7 to Delphi XE4. I am dealing with datasets.</p>
  
  <p>My dataset dsABC is declared like following:</p>
  
  <pre><code>TfrmMainForm = class(TForm)
    dsABC: TpFIBDataSet;
    ......
    ......
  end
  </code></pre>
  
  <p>dsABC is used like following at many places:</p>
  
  <pre><code>1. if (dsABC .Locate('ID', Id, [])) then   ---File 1
  2. dsABC.Edit ----File 2
  </code></pre>
  
  <p>I mean to say, wherever it is used, its throwing this above said error in Delphi XE4 but same is working fine in Delphi 7. </p>
  
  <p>But if I write following line before using dataset, it works fine</p>
  
  <pre><code>if not(dsABC.Active) then dsABC.Active := True;
  </code></pre>
  
  <p>I am forced to write this line in each and every file, and for each and every dataset in Delphi XE4 but I wonder then why its working in Delphi 7. Am I doing right to solve my problem or I need some default setting somewhere to get rid of this problem?</p>
  
  <p>Is dataset in Delphi 7 by default active and inactive in Delphi XE4 and you have to explicitly activate it in Delphi XE4?</p>
  
  <p>I found these links about this problem on stackoverflow, but nothing seems to be relating with my problem:</p>
  
  <p><a href="https://stackoverflow.com/questions/6774634/how-do-i-solve-the-cannot-perform-this-operation-on-a-closed-dataset-with-borl">How do I solve the &quot;Cannot perform this operation on a closed dataset&quot; with Borland Database Engine and a Delphi application?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/13288084/cannot-perform-this-operation-on-a-closed-dataset">Cannot perform this operation on a closed dataset</a></p>