Question about Connection Pooling in ASP

From: Dr. Know (DrKnow_at_electron.com)
Date: 01/22/05


Date: Sat, 22 Jan 2005 10:28:46 -0500


I have completed an Web App that accesses numerous databases and want
to ensure that connection pooling is being fully utilized

The connections are made through OLE DB, and I am uncertain how to
actually monitor this through Win Performance Monitor (perfmon.exe)
SQL monitors are not a problem, but I see nothing for OLE DB
connections. This is OLE DB, not ODBC. In as few words as possible,
how do I enable this on Win2k & IIS 5?

Also, how do you ensure that the app is written to fully avail itself
of the pooling features. I've read 'till my eyes are bleeding...

Will static connection string definitions declared as constants in the
head of the ASP page itself work? Avoiding Server.CreateObject?

Does this work with a directory based connection?
(i.e. A bunch of FoxPro .DBF/.CDX files in one directory.)

Such as in this simplified script:
---------------------------------------------------------

Const PROVIDER = "Provider=vfpoledb;Data Source=C:\DBFILESLOC\"
' ( Or should this be stored in an application variable?? )

..............

Function XYZ()

Dim objConn
Dim objRst

    set objConn = Createobject("ADODB.Connection")
    objConn.ConnectionString = PROVIDER
    objConn.Open ' PROVIDER <-- is it preferable to use here??

    Set objRst = CreateObject("ADODB.Recordset")
    objRst.ActiveConnection = objConn
    objRst.Open "SELECT * FROM [sampledbf] " & _
                         "ORDER BY KEY", _
                         objConn, _
                         adOpenStatic, _
                         adLockreadOnly, _
                         adCmdText

    Do some recordset stuff....

    objRst.Close
    objConn.Close
    set objConn = Nothing
    set objRst = Nothing

end function
---------------------------------------------------------

Thanks for any guidance...

Greg

Dr. Know



Relevant Pages

  • Re: ODBC/OLE DB Connection Pool
    ... but most OLE DB providers are. ... OLE DB provider indicates is supports a Free Threaded model ... >> connection be kept open for the application as this will serialize all ... >> The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.data.ado)
  • Re: ODBC/OLE DB Connection Pool
    ... but most OLE DB providers are. ... OLE DB provider indicates is supports a Free Threaded model ... >> connection be kept open for the application as this will serialize all ... >> The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.inetserver.asp.db)
  • Re: ODBC/OLE DB Connection Pool
    ... but most OLE DB providers are. ... OLE DB provider indicates is supports a Free Threaded model ... >> connection be kept open for the application as this will serialize all ... >> The ADO Connection object implicitly uses IDataInitialize. ...
    (microsoft.public.data.oledb)
  • Re: Word 2003 Closes upon update of sort order of table using Acce
    ... It seems the "Find Entry" button on the Mail merge tool bar only works after ... records and using that as the data source? ... DB connection and it doesn't see the table in Access at all So I will just ... You can solve and 2by using OLE DB to connect. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Word 2003 Closes upon update of sort order of table using Acce
    ... FWIW It is not your fault or my fault that it does not work, and that this kind of predefined limit is not specified. ... DB connection and it doesn't see the table in Access at all So I will just need to filter all tables as we only search the ... Have you tried defining an Access query that selects the necessary 1000 records and using that as the data source? ... You can solve and 2by using OLE DB to connect. ...
    (microsoft.public.word.mailmerge.fields)