Re: Connections

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks Alerto
daveP

"Alberto Poblacion" <earthling-quitaestoparacontestar@xxxxxxxxxxxxx> wrote
in message news:u6fSQ0WcHHA.1552@xxxxxxxxxxxxxxxxxxxxxxx
If you only need the connection briefly to read a few data, then spend a
lot of time processing these data, and then need the connection briefly
again, then it is better to close the connection while it is not in use.
In this way you free the server to use the connection for other processes,
and if every program does this the total nuber of connections needed on
the server will be smaller than if every process keeps the connections
open all the time. Don't worry about the overhead of "reopening" the
connection when you need it again; the connection pool will automatically
take care of minimizing the actual opening and closing of connections.


"DaveP" <dvs_bis@xxxxxxxxxxxxx> wrote in message
news:IYyOh.708$Q23.682@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
A. This Way opens connection...closes connect

method cleanNames()
1 get connection
2 get recordset
3. Close Connection
4 process Recordset
5. Open Connection
4 Commit Changes
6. Close Connection()
finished cleanames()
or
method cleanNames()
1 get connection
2 get recordset
3 process Recordset
4 Commit Changes
5. Close Connection()
finished cleanames()
or
this final way is in the parent Class or Calling Function
sends in the connections holds it open till the service is
completed of all jobs its Suppose to do
then releases the connection

method cleanNames(oconn) connection as parameter
1 get recordset
2 process Recordset
3 Commit Changes
finished cleanames()

Thanks
DaveP




.



Relevant Pages

  • Connections
    ... in the main class make my connection and keep it for all sub members ... Commit Changes ... finished cleanames() ...
    (microsoft.public.dotnet.languages.csharp)
  • Connections
    ... in the main class make my connection and keep it for all sub members ... Commit Changes ... finished cleanames() ...
    (microsoft.public.sqlserver)
  • connections
    ... in the main class make my connection and keep it for all sub members ... Commit Changes ... finished cleanames() ...
    (comp.databases.ms-sqlserver)
  • Re: Connections
    ... If you only need the connection briefly to read a few data, then spend a lot of time processing these data, and then need the connection briefly again, then it is better to close the connection while it is not in use. ... This Way opens connection...closes connect ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... So it is a kind of asynchronous commit which happens every 10 ... I am not sure of this claim as we have many applications built on SQL CE ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)