Re: ODBC/OLE DB Connection Pool - 1 attachment
From: Erland Sommarskog (esquel_at_sommarskog.se)
Date: 11/27/04
- Next message: rseedle: "sqlclient fill gets Access denied Error"
- Previous message: Erland Sommarskog: "Re: ODBC/OLE DB Connection Pool"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 27 Nov 2004 23:02:04 +0000 (UTC)
Bob Barrows [MVP] (reb01501@NOyahoo.SPAMcom) writes:
> Erland Sommarskog wrote:
>> Well, in VB it as easy as:
>>
>> Publlc Function Button1_Click () As
>> Dim cnn As new ADODB.Connection
>> ...
>> Set cnn = Nothing
>> End Function
>
> This does not shut off pooling. Where did you get this idea? Closing thie
> connection in this case simply released it to the pool
I got this idea from testing and observing. Run the attached project, and
fire up SQL Profiler. Notice that each time you click the button you get
an Audit Login and Audit Logout event. There's definitely no pooling going
on.
Of course, this presumes that you don't have any global connection anywhere.
(If you move the declaration of cn to form level, you do get pooling.)
-- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp begin 644 namedparamtest.zip M4$L#!!0````(`$BC:S$Z27'_=00``$$-```<````;F%M961P87)A;71E<W0O M861O<V%M<&QE+F9R;:U6;6_B1A#^'BG_8<2'.Z+F$*^Y]*Y42H"T2!QP(4T^ M1HL]X.T9K[5>$_CWG5VOUW:..%552QC8>7_FF;$?)_>KZ6(.@U:[?7YVBUL> MP>-MZT[('>A;!\[/`&#$8L5%!/DUI$_#R!N9/.08J3^1;P.5RP?M[J`DG.%& M%<97[9+H0<0EO[U^V>R)^RIPLO[5=68XX]$/,N/>&PFM/!9BD4\U(2,L'%<] MKQ23ZJ]X*1)N2C8I`7Q\XI$O7A(8XX:EH3*Z#J\'/*A;<8!%JN)499C154K` M!>IV?QWD\@*30MZST-#UC>)PJA1+XD\=RN5!II@K/;#U-/+Q4/;A`NB\H'09 MF)@O$K:+0VQMY*'QI=UNNXA%)PK][J#KY"70G+S?M@5-(K^*RL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E3,QT%9UXN`%!+`P0*```` M``!(HVLQ````````````````#P```&YA;65D<&%R86UT97-T+U!+`0(4`!0` M```(`$BC:S$Z27'_=00``$$-```<``````````$`(`"V@0````!N86UE9'!A M<F%M=&5S="]A9&]S86UP;&4N9G)M4$L!`A0`"@``````2*-K,0K;"V`&```` M!@```!P``````````0`@`+:!KP0``&YA;65D<&%R86UT97-T+V%D;W-A;7!L M92YF<GA02P$"%``4````"`!(HVLQ`JV_=?H!```:`P``'``````````!`"`` MMH'O!```;F%M961P87)A;71E<W0O861O<V%M<&QE+G9B<%!+`0(4`!0````( M`%:B:S%?F'FQ*@```#$````<``````````$`(`"V@2,'``!N86UE9'!A<F%M M=&5S="]A9&]S86UP;&4N=F)W4$L!`A0`"@``````2*-K,0`````````````` M``\````````````0`/]!AP<``&YA;65D<&%R86UT97-T+U!+!08`````!0`% +`&4!``"T!P`````` ` end
- Next message: rseedle: "sqlclient fill gets Access denied Error"
- Previous message: Erland Sommarskog: "Re: ODBC/OLE DB Connection Pool"
- Messages sorted by: [ date ] [ thread ]