Link component in DataModule lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- janhsh · 2007-07-30 17:26 Je voudrais, pouvoir lier un Datasource d'un form avec un dataset se trouvant dans un Datamodule (comme dans Delphi) Mais, au designtime, il, n'est pas possible d'affecter à un champ d'un composant, un autre composant se trouvant dans une autre form ou dans un Datamodule. I would like to link Datasource of a Form with a dataset being in Datamodule (same as Delphi). But, at the designtime, it, is not possible to assign to a field of one component, another component being in another Form or Datamodule. ---------------------------------------------------------------------- jesusr · 2007-08-07 00:30 As you found that is currently not implemented, you have to do the links in code. for example you have a datamodule dm1 (in unit1) and a form form1 (in unit2), then include dm1 unit in uses clause of form1 unit and then in form's event OnCreate link your datasource: Code: [Select] // form1 unit unit unit2; ... implementation uses unit1; // unit1 is datamodule unit .... // on form's OnCreate handler... procedure TForm1.FormCreate(Sender: TObject); begin Datasource1.Dataset := dm1.MyDataset; .... ---------------------------------------------------------------------- HowardH · 2007-11-08 22:01 How poor. I struggled with this for about 2 hours before I came across this. I even tried putting the value in the dfm directly as text, and got a invalid property error. I'm beginning to think Lazarus is Not Quite Ready for Prime Time. However, I will continue onward through the fog... For now, the simple app that I am trying to build can just contain all of the DB components with the form that uses them. BTW, I have noticed that Lazarus pukes if you try to delete a database component while it is active.