Re: question about proper production db/ado usage
From: Sean Nolan (seann_at_imgno%spaminc.com)
Date: 03/18/05
- Previous message: Cowboy (Gregory A. Beamer) - MVP: "RE: Performance difference"
- In reply to: Flip: "question about proper production db/ado usage"
- Next in thread: Flip: "Re: question about proper production db/ado usage"
- Reply: Flip: "Re: question about proper production db/ado usage"
- Messages sorted by: [ date ] [ thread ]
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.
>
- Previous message: Cowboy (Gregory A. Beamer) - MVP: "RE: Performance difference"
- In reply to: Flip: "question about proper production db/ado usage"
- Next in thread: Flip: "Re: question about proper production db/ado usage"
- Reply: Flip: "Re: question about proper production db/ado usage"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|