Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
yuryn1961
Starting Member
3 Posts |
Posted - 2008-07-02 : 12:25:47
|
Hi to all,The application is being developed using C# (ASP.NET 2.0 framework).I created a class to connect to the database, let's say, DbClass. The page has some user controls, which get data from various tables. Every control creates an instance of DbClass. My question is: is the connection object created for every control, or in the first instance of DbClass only? If it is created for every control, may I create this object once (on which level?) and use in all user controls?Thank you. |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-07-02 : 18:08:25
|
If i do understand you properly.You only need one connection to your database in the class |
|
|
|
|
|