 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Wed Oct 18, 2006 5:05 pm Post subject: Best practices for database interaction? |
|
|
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 |
|
 |
|
|
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
|
|