RE: keeping sql connection open

Tech-Archive recommends: Fix windows errors by optimizing your registry



An interesting comparison is between clients like Oracle Forms, which connect
for the duration and the .Net client apps which, as you say, generally take
the disconnected approach. This not only means having no persistant db
connection but also things like 'optimisistic locking' where you don't lock
the data you fetch or modify on the client. Instead you check the database at
the point you perform the update/insert/delete to see if anyone else has
changed the data while you've had it in front of you (so to speak) on the
client. Coming from a traditional 'connected' background this does take
getting used to. Something like Oracle Forms will happily stream and cache
millions of rows from a database for you, and lock those you 'touch'.

With web based applications it makes sense to disconnect after each
transaction. The thought of users spread across a network, which could be
global, running an web form application and each one having a persitent
dedicated connection is scary :)

Rob J





"lokee" wrote:

> hello all....
> i have one query....
> can somebody please tell me advantages and disadvantages of making
> connection to sql server open at the start of application and closing it at
> the end of application (in windows application or web application) ?
> what will be consequences ?
> is it a good practice ?
> please comment.
> actually me and my friend is having argument on this...
> he says, dot net have disconnected architecture.... so u dont need to every
> time (in ur functions or subroutines where u executes different sql commands)
> open or close the connection.
> well, what is a good practice ?
> what exactly is the meaning of disconnected architecture ?
> please comment.
>
>
.



Relevant Pages

  • Re: Socket
    ... When you disconnect, TCP detects that the connection was broken. ... i used to sent pong to server when server pinged ... Now on client side when client recived ...
    (microsoft.public.dotnet.faqs)
  • Re: Socket
    ... When you disconnect, TCP detects that the connection was broken. ... i used to sent pong to server when server pinged ... Now on client side when client recived ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Socket
    ... When you disconnect, TCP detects that the connection was broken. ... i used to sent pong to server when server pinged ... Now on client side when client recived ...
    (microsoft.public.dotnet.general)
  • Graceful disconnect/reconnect for IB_Connection (using IB Objects)
    ... I have client server application that I am trying to make more ... Given a consistent connection, everything works the way it is ... Detect the disconnect and put my clients in a corresponding ... I have looked through the help files on IBO but cannot find a decent ...
    (borland.public.delphi.thirdpartytools.general)
  • [PATCH 0/5] [RFC] AF_RXRPC socket family implementation [try #3]
    ... These patches together supply secure client-side RxRPC connectivity as a Linux ... kernel socket family. ... presentation side is left to the client. ... Each connection goes to a particular "service". ...
    (Linux-Kernel)