|
-
Jul 16th, 2004, 01:48 PM
#1
global DB connection in classes?
I am writing some classes that will be used to hold and deal with customer info stored in a SQL Server DB.
Now when loading or saving data, I need a connection to the SQL Server. What is the best way to impliment this so that each time a class is created it doesn't create its own connection to the database? Could I create a base class that holds the DB connection and each class could inherit from this class to use its connection to the database?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|