Forum > Databases

Data form/module?

(1/1)

Reenen:
Hi,

I recall that BCB or delphi, (not sure which), has a data module.  Where you can drop your data access components, and then access them from whichever form you are on.

Is there something similar in Lazarus?  

-Reenen

matthijs:
I know for sure that Delphi has a datamodule, this was introduced in Delphi2. I guess BCB will have a datamodule as well, as the IDE and compiler are really the same. :) Your question is about Lazarus so: Lazarus does have a datamodule, but ...
In design time it is not (yet) possible to link a datasource on your form to a dataset on your datamodule. You can assign this during runtime.

In short, you can use a datamodule to put all your data-access logic together in one place, the connection between your data-access and your gui you have to make during runtime. For instance like this:

--- Code: ---
uses
  U_with_Datamodule;
procedure TForm1.Create(Sender: TObject);
begin
  myDataSource.DataSet := myDataModule.myDataSet;
end;

--- End code ---

Anonymous:
Thanks... So I basically create a

What is the highest priority improvements on lazarus?

I guess there are several people working on several different things at the moment.  I might be able to give a hand, but I wouldn't know where to start.

-Reenen

Navigation

[0] Message Index

Go to full version