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 

Best practices for database interaction?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Wed Oct 18, 2006 5:05 pm    Post subject: Best practices for database interaction? Reply with quote



Hi,

I am currently writing an application in Delphi 5 which is supposed to
connect to and diagnose Access databases using BDE. Since I am an
inexperienced Delphi programmer I was hoping that you could help me out

by sharing your best practices with me concerning database interaction.


Where to put database connection?
My initial thought is to put the database connection in the main form.
Creating and opening it in the constructor, destroying and closing in
the destructor.

Where to put DataSources?
Since many DataAware controls can connect to the same DataSource it
seems to me that it belongs in a DataModule?

How many DataModules?
Should I use one big DataModule for all Querys and DataSources or
should I have one DataModule for each pair of them or maybe something
in between?

How to connect Querys to database?
As I have understood this is just a matter of using the same database
name for the connection as well as the Queries?

How to change database on the fly?
Just change the alias for the connection?

A lot of questions, hope you can bare with me. I have little time, no
expertise around and want to get it right and write good code.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases 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.