H
Hornet77
Hi all
I'm developing a software written in c# (.NET 2.0) with a SQL server
2005 database. I have 3 modules that need to access database:
- a simple ASP.NET website receiving event from remote devices via https
calls
- a windows service running 24/7 that act as a server
- a winform application running as a client with user interface,
launched by the user
3 modules use .NET remoting to communicate.
In order to query DB actually I'm using a single connection for each
module, always opened (for the ASP.NET site I use a static instance of
my "dbManager" class)... when I neeed to query the database I use the
already opened connection and leave it opened for further operation.
Is this acceptable? what kind of problems can cause? Should I use
another approach (open and close connection for every operation)?
Thanks in advance
I'm developing a software written in c# (.NET 2.0) with a SQL server
2005 database. I have 3 modules that need to access database:
- a simple ASP.NET website receiving event from remote devices via https
calls
- a windows service running 24/7 that act as a server
- a winform application running as a client with user interface,
launched by the user
3 modules use .NET remoting to communicate.
In order to query DB actually I'm using a single connection for each
module, always opened (for the ASP.NET site I use a static instance of
my "dbManager" class)... when I neeed to query the database I use the
already opened connection and leave it opened for further operation.
Is this acceptable? what kind of problems can cause? Should I use
another approach (open and close connection for every operation)?
Thanks in advance