Re: ODBC/OLE DB Connection Pool

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


Date: Wed, 24 Nov 2004 15:43:05 -0700

OLE DB connection pooling is not the ODBC counter. You do not need to force
OLE DB connection pooling with the OLE DB Services=-1 setting, as most
providers already have this on. e.g., look the the SQLOLEDB class ID in the
registry:

HKCR\CLSID\{0C7FF16C-38E3-11d0-97AB-00C04FC2AD98}, and you will see a DWORD
key called OLE DB Services set to -1 (0xffffffff).

To get OLE DB connection pooling to work, an instance of the OLE DB
interface, IDataInitialize must be maintained. In the ADO world, this
translates to - you must keep at least one ADO connection around. In the
past, I have used the MDAC simple provider (since it is not a connection to
any real db, but adequetly, it keeps IDataInitialize around).. The
connection string for the Simple Provider is "Provider=MSDAOSP.1;Persist
Security Info=false". Just create an ADO connection with this.

Not sure how to translate this to ASP, since I don't know enough of whether
you have some global place to create a persistent object. I always thought
ASP / IIS did this for you.

Cheers,

Stu

"Kevin Joseph" <kejoseph@hotmail.com> wrote in message
news:54c48ac0.0411241335.608ad7d7@posting.google.com...
> I am trying to get Connection Pooling to work in the ASP code (which
> runs on IIS 5.0 server) and have tried numerous permutations and
> combinations but all have failed. Listed are all the connection
> strings I have tried. However I cannot seem to get connection pooling
> to work ; I know this as the Connection Pool ODBC counters in
> performance monitor show up as zero. Result is that intermittently I
> get SQL_Server_does_not_exist_or_access_denied error messages in the
> IIS log files.
>
> cn.Open "Provider=sqloledb;Data
> Source=server_name\instance_name;initial Catalog=XXXX;User
> Id=YYYYYY;Password=ZZZZZ;;OLE DB Services=-1"
>
> cn.Open "Provider=sqloledb;Data
> Source=server_name\instance_name;initial Catalog=XXXX;User
> Id=YYYYYY;Password=ZZZZZ;"
>
> cn.Open = "Data Source='Data_Source';User
> ID='YYYYYY';Password='ZZZZZZ';"
>
> Any input on these would really help.
>
> Kevin



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: ODBC/OLE DB Connection Pool
    ... OLE DB connection pooling is not the ODBC counter. ...
    (microsoft.public.inetserver.asp.db)