On Datamodule Create - Database not assigned lazarus / 16-Databases ---------------------------------------------------------------------- musicones · 2009-09-14 09:21 Hi, I have Datamodules that are created automatically in the project file: Code: [Select]...   Application.Initialize;   Application.CreateForm(TImagesModule, ImagesModule);   Application.CreateForm(TDatabaseModule, DatabaseModule);   Application.CreateForm(TContactsModule, ContactsModule);   Application.CreateForm(TMainForm, MainForm);   Application.Run; ... While its on "Application.CreateForm(TContactsModule, ContactsModule);" I get this error:  EDatabaseError : Database not assigned I have debbuged the code and it stops in "Application.inc" - procedure TApplication.CreateForm(InstanceClass: TComponentClass;   out Reference); on command:     Instance.Create(Self); Take a look into the attached screenshot. The Datamodule has no "onCreate" event on my side and further debugging step into Instance.Create does not work. The Module contains a TTransaction, a TSQLQuery and a TDatasource. They are all linked together how they should. It all should connect to a Firebird Database. In Design Mode all seems to be ok. I could connect to Database and Link the SQLQuery, get the fields of the Table, all good. I don't know why it doesn't work. Maybe someone has a clue. regards musicones ---------------------------------------------------------------------- musicones · 2009-09-21 06:19 I have changed to ZEOS Library and now it all seems to work fine