Re: ODBC/OLE DB Connection Pool
From: Stuart Carnie (StuartCarnie_at_newsgroup.nospam)
Date: 11/24/04
- Next message: Val Mazur: "Re: Stored Procedure Syntax"
- Previous message: Michael Bauers: "Character being converted when calling Execute method"
- In reply to: Kevin Joseph: "ODBC/OLE DB Connection Pool"
- Next in thread: Kevin Joseph: "Re: ODBC/OLE DB Connection Pool"
- Reply: Kevin Joseph: "Re: ODBC/OLE DB Connection Pool"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Val Mazur: "Re: Stored Procedure Syntax"
- Previous message: Michael Bauers: "Character being converted when calling Execute method"
- In reply to: Kevin Joseph: "ODBC/OLE DB Connection Pool"
- Next in thread: Kevin Joseph: "Re: ODBC/OLE DB Connection Pool"
- Reply: Kevin Joseph: "Re: ODBC/OLE DB Connection Pool"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|