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.
My dataset dsABC is declared like following:
TfrmMainForm = class(TForm)
dsABC: TpFIBDataSet;
......
......
end
dsABC is used like following at many places:
1. if (dsABC .Locate('ID', Id, [])) then ---File 1
2. dsABC.Edit ----File 2
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.
But if I write following line before using dataset, it works fine
if not(dsABC.Active) then dsABC.Active := True;
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?
Is dataset in Delphi 7 by default active and inactive in Delphi XE4 and you have to explicitly activate it in Delphi XE4?
I found these links about this problem on stackoverflow, but nothing seems to be relating with my problem: