Re: ODBC/OLE DB Connection Pool
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 11/29/04
- Next message: Stuart Carnie: "Re: ODBC/OLE DB Connection Pool"
- Previous message: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- In reply to: Stuart Carnie: "Re: ODBC/OLE DB Connection Pool"
- Next in thread: Stuart Carnie: "Re: ODBC/OLE DB Connection Pool"
- Reply: Stuart Carnie: "Re: ODBC/OLE DB Connection Pool"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 15:34:10 -0500
Stuart Carnie wrote:
>> The first two are not relevant in ASP. The last one is also not
>> relevant: ADO is not free-threaded, so it is not recommended that a
>> single global connection be kept open for the application as this
>> will serialize all communications with the database.
>
> This is incorrect - OLE DB objects are free threaded. It does not
> serialize database access - my test application demonstrates this as
> it is very multithreaded, and the connections are reused without any
> problems across threads ONCE they are returned to the pool.
That may be so, but according to msdn, ADO installs itself as
apartment-threaded, unless the registry setting is made to make it
both-threaded. This is well-documented at msdn.microsoft.com/library (look
up makfre15.bat). See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnasp/html/asptips.asp
(the tip against caching connection in Application and Session)
According to that article, using a connection cached in Application (which
is really the only way to accomplish the goal of having a single global
connection in ASP) causes all database access to be serialized.
Bob Barrows
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
- Next message: Stuart Carnie: "Re: ODBC/OLE DB Connection Pool"
- Previous message: Bob Barrows [MVP]: "Re: ODBC/OLE DB Connection Pool"
- In reply to: Stuart Carnie: "Re: ODBC/OLE DB Connection Pool"
- Next in thread: Stuart Carnie: "Re: ODBC/OLE DB Connection Pool"
- Reply: Stuart Carnie: "Re: ODBC/OLE DB Connection Pool"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|