Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Databases > Best practices ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 943 of 988
Post > Topic >>

Best practices for database interaction?

by MorrganMail@[EMAIL PROTECTED] Oct 18, 2006 at 05:05 AM

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.
 




 1 Posts in Topic:
Best practices for database interaction?
MorrganMail@[EMAIL PROTEC  2006-10-18 05:05:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 3:26:50 CDT 2008.