Re: ODBC/OLE DB Connection Pool
From: Mark (Mark_at_discussions.microsoft.com)
Date: 11/26/04
- Next message: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- Previous message: Erland Sommarskog: "Re: ODBC/OLE DB Connection Pool"
- Maybe in reply to: Kevin Joseph: "ODBC/OLE DB Connection Pool"
- Next in thread: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- Reply: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- Reply: Erland Sommarskog: "Re: ODBC/OLE DB Connection Pool"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 25 Nov 2004 16:49:01 -0800
Just to throw something else in the works - if Application Roles are used in
SQL Server then connection pooling will not work. I forget whether it causes
errors to be raised or if it just doesn't work properly, or which version of
ADO or OLEDB driver it's specific to.
Are Application Roles being used in this case?
"Bob Barrows [MVP]" wrote:
> Erland Sommarskog wrote:
> > Bob Barrows [MVP] (reb01501@NOyahoo.SPAMcom) writes:
> >> If you read Stuart's post carefully, you will see that you do not
> >> have to do anything to turn Session pooling on. It's on by default.
> >> You have to do extra work to turn it off.
> >
> > Well, in VB it as easy as:
> >
> > Publlc Function Button1_Click () As
> > Dim cnn As new ADODB.Connection
> > ...
> > Set cnn = Nothing
> > End Function
>
> This does not shut off pooling. Where did you get this idea? Closing thie
> connection in this case simply released it to the pool
>
> >
> > And if there is no global ADODB.Connection, there will be no pooling.
> > (Which Stuart also discussed in his post.)
>
> ??
> I think you've misinterpreted " ... you must keep at least one ADO
> connection around." From all the articles I've read, pooling is always on,
> unless you turn it off. From
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmdac/html/pooling2.asp:
>
> "As applications open connections to a given data store and subsequently
> release them, a pool of open connections is built with complete
> authentication information and connection properties. Then, if available,
> connection requests to the same data store (with the same user
> authentication and connection properties) are satisfied from the pool rather
> than by making the connection on demand. Connections are held open for a
> period of time after a consumer application has released them. They are
> released by the pooling mechanism when they time out."
>
> So all that needs to happen to initiate a pool is to open a connection.
> There appears to be no obligation to keep a connection open. A global
> connection object that is never closed until the application closes does
> bypass the use of the pool, since the application will never request another
> connection. But this does not turn off pooling. If the global connection
> object is closed
>
> Now, whether there will be a connection in the pool ready to be used is
> another story.
>
>
> Bob Barrows
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
>
- Next message: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- Previous message: Erland Sommarskog: "Re: ODBC/OLE DB Connection Pool"
- Maybe in reply to: Kevin Joseph: "ODBC/OLE DB Connection Pool"
- Next in thread: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- Reply: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- Reply: Erland Sommarskog: "Re: ODBC/OLE DB Connection Pool"
- Messages sorted by: [ date ] [ thread ]