| View previous topic :: View next topic |
| Author |
Message |
Bill Todd Guest
|
Posted: Thu Dec 29, 2005 2:21 am Post subject: Re: When to use DataModule |
|
|
There are three reasons to use a data module.
1) To get the data access components off of the form to avoid clutter
when designing or changing the form.
2) To share the data access components with more than one form.
3) To separate the data access code from the UI code.
Using data modules is optional an how and when you use them is a matter
of personal taste and convenience. Most developer's find that data
modules make life easier when they are writing an application but I
would not invest a lot of time in moving data access components from a
form to a data module unless there is some benefit to justify the
effort.
--
Bill Todd (TeamB)
|
|
| Back to top |
|
 |
Charlie Guest
|
Posted: Thu Dec 29, 2005 2:28 am Post subject: When to use DataModule |
|
|
I'm using Delphi 5 CS, dBase files to modify Accounting for Delphi to fit my
business. Most of my adaptation thus far has been to the order entry module.
A data module is not used. The TTables and TQueries are placed on the forms.
Should I move these to a data module? When is it appropriate to use both a
data module and place TTables & TQueries on form(s) also.
Thank you,
Charlie
|
|
| Back to top |
|
 |
Charlie Guest
|
Posted: Thu Dec 29, 2005 3:35 am Post subject: Re: When to use DataModule |
|
|
Thank you Bill, have a Happy New Years.
Charlie
"Bill Todd" <no (AT) no (DOT) com> wrote
| Quote: | There are three reasons to use a data module.
1) To get the data access components off of the form to avoid clutter
when designing or changing the form.
2) To share the data access components with more than one form.
3) To separate the data access code from the UI code.
Using data modules is optional an how and when you use them is a matter
of personal taste and convenience. Most developer's find that data
modules make life easier when they are writing an application but I
would not invest a lot of time in moving data access components from a
form to a data module unless there is some benefit to justify the
effort.
--
Bill Todd (TeamB)
|
|
|
| Back to top |
|
 |
|