Recent

Author Topic: Data form/module?  (Read 5937 times)

Reenen

  • New Member
  • *
  • Posts: 29
    • http://daringapprentice.wikispaces.com
Data form/module?
« on: April 21, 2005, 04:27:57 pm »
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

  • Hero Member
  • *****
  • Posts: 537
Data form/module?
« Reply #1 on: April 21, 2005, 09:14:14 pm »
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: [Select]

uses
  U_with_Datamodule;
procedure TForm1.Create(Sender: TObject);
begin
  myDataSource.DataSet := myDataModule.myDataSet;
end;
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Anonymous

  • Guest
Data form/module?
« Reply #2 on: April 26, 2005, 08:55:01 am »
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

 

TinyPortal © 2005-2018