The forms are maybe linked to the datamodules via e.g. dbgrids and other db aware controls. I'd say first the dm module with the connection, then the other dms, and only then the forms.
Yes,
is exactly what I did.
At design time is OK: I see data(the records) in rxdbgrid, but at run time .....
this is my .lpr file:
------------------------------------------------------------------------------------
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, rxnew, zcomponent, Unit1, dmconnection, dmdatasource;
{$R *.res}
begin
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TDMConn, DMConn); <--- this is Data module with Zconnection comp.
Application.CreateForm(TDMDS, DMDS); <--- this is Data module with zTable, datasource
(Ztable is linked with Zconnection component)
Application.CreateForm(TForm1, Form1); <--- this is form with dbgrid (is linked with datasource)
Application.Run;
end.
------------------------------------------------------------------------------------
at row: Application.CreateForm(TDMDS, DMDS); there is the error:
Project projecr1.exe raised exception class 'EZDatabaseError' with massage:
Database connection component is not assigned
!
Paolog