Re: connections
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Wed, 28 Mar 2007 22:41:27 +0000 (UTC)
DaveP (dvs_bis@xxxxxxxxxxxxx) writes:
im writing a service that will be on a app server
this is one of many service's to process Recordsets from Sql Server...
1 service may have 20 Processes to Complete
example
main class PreProcess()
method CleanNames();
method updateNames();
methodr ValidateContracts();
Various things must be completed
Suedo Example below
My question is
in the main class make my connection and keep it for all sub members
or connect in each member
I'm not really sure I understand, but if the members are intended to
be separate threads, you should definitely have one connection per
member.
If they are just different tasks that a single-threaded service will
perform, it's more of a toss-up, but I think the idiom today is to stick
with local connections. Keep in mind that ADO .Net maintains a connection
pool where it lingers to disconnected connections and then reuse them
if there is a request for a connect with the same properties within
some timefram (60 seconds, I believe).
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- connections
- From: DaveP
- connections
- Prev by Date: Re: SQL Server Problem
- Next by Date: Re: Newbie on permissions: ADO.NET, C++.NET, SQL SERVER 2005 EXPRESS, Visual Studio 2005
- Previous by thread: connections
- Index(es):
Relevant Pages
|