Re: question about proper production db/ado usage

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

From: Sean Nolan (seann_at_imgno%spaminc.com)
Date: 03/18/05

  • Next message: JV: "BUG: Sql Command Editor"
    Date: Fri, 18 Mar 2005 15:38:46 -0600
    
    

    Hi Flip,

    The SQL Server provider supports pooling directly. The OleDb provider simply
    uses the pooling that is in OLE DB. Other providers should support pooling
    too, but that's dependent on the vendor. Pooling is the default, which is
    why so many samples you see don't do anything to make pooling happen. The
    two key rules are - always use the exact same connection string when you
    create a new connection (pools are based on the connection strings being the
    same) and make sure to call Close on a connection when you're done using it
    (which releases it back to the pool).

    Pooling is nicely described here:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconConnectionPoolingForSQLServerNETDataProvider.asp

    Sean

    "Flip" <[remove_me]phenry_w@hotmail.com> wrote in message
    news:OulIS%23$KFHA.3332@TK2MSFTNGP15.phx.gbl...
    > I've been reading up a bit on ADO usage and a few questions come to mind
    > I'm hoping people can help me out with.
    >
    > All the examples I see have their own connection string and connections,
    > isn't that a bit of a waste? Not just in typing/memory usage/connections,
    > but also from the code maintainability aspect. If you change the DB
    > password, you have to go in all the code and change that. I'm sure there
    > is a better way to do this, any good web references about this? I would
    > assume creating a connection string in the global.asax (is that the name?)
    > is one way and always reference that?
    >
    > In our J2EE projects we create/use a connection pool in WebLogic, is there
    > a way to do that as well, so the web apps doesn't even need to know about
    > the db, we just use the connection pool.
    >
    > Speaking of connection pools, I've read that IIS uses them, but if you're
    > creating connections on every aspx, how does IIS know how to
    > pool/reuse/free those resources?
    >
    > Thanks.
    >


  • Next message: JV: "BUG: Sql Command Editor"

    Relevant Pages

    • Re: Question Regarding ADO Connection Pooling
      ... > I have a web app that runs on windows web server with IIS 5.0. ... > Oracle db and the msora provider. ... write a small loop that opens and closes the connection about 50 times. ... ADO does little for pooling connection resources on its own. ...
      (borland.public.delphi.non-technical)
    • Re: ODBC/OLE DB Connection Pool
      ... > Connection Pool (I have already completed the TCP/IP tasks without ... turning off pooling is the errors you are seeing. ... problems are occurring with SQL Server; for example, ... ASP developers should open one connection per set of unique user ...
      (microsoft.public.data.ado)
    • Re: ODBC/OLE DB Connection Pool
      ... > Connection Pool (I have already completed the TCP/IP tasks without ... turning off pooling is the errors you are seeing. ... problems are occurring with SQL Server; for example, ... ASP developers should open one connection per set of unique user ...
      (microsoft.public.inetserver.asp.db)
    • Re: ODBC/OLE DB Connection Pool
      ... > Connection Pool (I have already completed the TCP/IP tasks without ... turning off pooling is the errors you are seeing. ... problems are occurring with SQL Server; for example, ... ASP developers should open one connection per set of unique user ...
      (microsoft.public.data.oledb)
    • Re: Question about IDispose
      ... connection pool is specifically setup to prevent object destruction because ... So the *fix cannot come from the Dispose layer. ... The benefits of pooling here make or break the website. ...
      (microsoft.public.dotnet.languages.csharp)