Re: ODBC/OLE DB Connection Pool

From: Stuart Carnie (StuartCarnie_at_newsgroup.nospam)
Date: 11/29/04


Date: Mon, 29 Nov 2004 13:44:00 -0700


"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:OHVmJLl1EHA.2568@TK2MSFTNGP10.phx.gbl...
> 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.
>
>

Understood that ASP does things differently, and as you mention, it doesn't
support the concept of a global variable / object, in the traditional sence,
so this solution does not apply. Intesting they have their own connection
manager. Seems like simply initializing OLE DB inside ASP would be a very
beneficial addition :).. Doing this inside a dll that is run inside the
DLLHost / IIS process could work, but beyond the scope of this discussion
;-)



Relevant Pages

  • RE: passwords in asp pages
    ... about the specifics of the connection other than the type (ie. by type I ... about your asp, ... passwords for credentials to an sql database on another machine. ... to facilitate one-on-one interaction with one of our expert instructors. ...
    (Security-Basics)
  • Re: Problem with ASP on Webserver
    ... I just enabled more ASP debug information and the dump looks like this: ... calling service 0x00044110 with connection socket ... (Accept-Language:) ... Server: Microsoft-WinCE/5.0 ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Problem with ASP on Webserver
    ... m_bstrScriptData, // script text ... ASP: Parse error in script caught by IActiveScript ... (Accept-Language:) ... calling service 0x00044110 with connection socket ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Perplexing connection problem - Win2K ASP/Jet DB
    ... The connection cannot be used to perform this operation. ... >the asp page page will do its data processing successfully, ... Repeated requests will subsequently fail and report the same ... >something to do with the operating environment. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Problem with ASP on Webserver
    ... I just enabled more ASP debug information and the dump looks like this: ... calling service 0x00044110 with connection socket ... (Accept-Language:) ... I have a problem with the web server on windows CE 5.0 when running an ASP ...
    (microsoft.public.windowsce.platbuilder)