Hello everyone,
I'm working with Windows 10/11, Lazarus version 2.2.6, FPC version 3.2.2, Sqlite version 3.43.1, ZEOS dbo (last version) and I'm migrating an application from Delphi 11.3 to Lazarus.
My application contains about 60 data files, many of them with reference fields (to secure data entry). Several times, I've patiently recreated all the forms, and set up 2 datamodules (1 for the "reference" data files, 1 for the "details" files), but I always encountered the same error message. This program, developed with Delphi, has been my working program for over 15 years now. I use it daily and I want to leave embarcadero and his Delphi.
Whereas all my data files are opened when the program is launched, my forms (there are 30 of them) are created on the fly, i.e. when I need them, then closed by the standard procedure...
procedure Tfsoins64.MRepVMolecClick(Sender : Tobject);
begin
FRepVMolecule64 := TFRepVMolecule64.Create(Self);
FRepVMolecule64.ShowModal;
FRepVMolecule64.Free;
End;
But data files stay open, they are closed when I quit program.
Example: plant file (Produits more than 4000 plants) which "points" to a file listing the various plant families (Botanique about 300 records and other files). My "reference" files (30) can contain between 2,000 and 6,000 records each, and my "detail" files several tens of thousands, with the main file (Chromato) reaching 150,000 records.
The form detailing the various plants and their virtues in various galenic forms (one form per galenic form) contains 21 dBGrids spread over several pages of one PageControls. At the design stage, everything looks good.
When I look at the .lfm of the module managing the largest form (58,000 lines), and even though I'm using dBLookUp, I'm surprised to see that all the "reference" files are included in the PickList .lfm file (see attached .lfm file)... Is it the origin of the problem ?
Although, for practical reasons and display speed, as saying, all my data files are opened when the main form is created, I get the following error every time: "Operation cannot be performed on inactive dataset" at attempt of execution.
Please, how can I overcome this error, which causes the program to freeze?
Best regards,
PS : I'm therapist, not a computer scientist