BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

When to use DataModule

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Bill Todd
Guest





PostPosted: Thu Dec 29, 2005 2:21 am    Post subject: Re: When to use DataModule Reply with 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
Charlie
Guest





PostPosted: Thu Dec 29, 2005 2:28 am    Post subject: When to use DataModule Reply with quote



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





PostPosted: Thu Dec 29, 2005 3:35 am    Post subject: Re: When to use DataModule Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.