I'm making a databse management tool with VS.NET 2003 C#.
The InvalidOperationException occured RANDOMLY.

"A connection pooling error has occurred."

I'm accessing SQL server 2000 (MSDE Release A) through SqlConnection.
The database that I'm using is set as SINGLE USER by EM.
So I created one connection object and reused it repeatly.
(Connection is keeping open during application is running.)
No exception when working and running, but the exception thrown when
application closing. (Exactly, when SqlConnection.Close () method called.)

I searched ms .net newsgroup (by google), I know I have not to use
SqlConnection.Close() in any destructor routine, and my code has no
destructor at all project. (Even no "~" character on whole sources.)
I didn't call Close() method at any destructor, and Close () method is
places on Dispose() method currently.

My SqlConnection is wrapped by a component that placed on a form by the
designer.



PS.
I have to use SINGLE USER option, cause there is special reason, please
don't discuss about it.







THIS IS EXCEPTION DETAILS:

- $exception {System.InvalidOperationException}
System.InvalidOperationException
- System.SystemException {"A connection pooling error has occurred."}
System.SystemException
- System.Exception {"A connection pooling error has occurred." }
System.Exception
System.Object {System.InvalidOperationException} System.Object
_className null string
_COMPlusExceptionCode -532459699 int
_exceptionMethod <undefined value> System.Reflection.MethodBase
_exceptionMethodString null string
_helpURL null string
_HResult -2146233079 int
_innerException { } System.Exception
_message "A connection pooling error has occurred." string
_remoteStackIndex 0 int
_remoteStackTraceString null string
_source null string
+ _stackTrace {System.Array} System.Object
_stackTraceString null string
_xcode -532459699 int
_xptrs 0 int
HelpLink null string
HResult -2146233079 int
InnerException { } System.Exception
Message "A connection pooling error has occurred." string
Source "System.Data" string
StackTrace " at System.Data.SqlClient.SqlConnection.Close()\r\n at
F176.Database.Generator.Dispose()\r\n at
F176.Database.Server.Dispose()\r\n at
F176.Database.Manager.Dispose(Boolean disposing)\r\n at
System.ComponentModel.Component.Finalize()" string
+ TargetSite {System.Reflection.RuntimeMethodInfo}
System.Reflection.MethodBase
+ this {F176.Database.Generator} F176.Database.Generator

Re: "A connection pooling error has occurred." exception thrown randomly when SqlConnection.Close(). (In Dispose() method) by F176

F176
Thu May 13 07:18:05 CDT 2004

I resolved this problem by making connection pooling disable.
To disable connection pooling, includes this string to connection string.

Pooling=false

For more details, see MSDN topic:
"Connection pooling for the .NET Framework Data Provider for SQL Server."

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconnectionpoolingforsqlservernetdataprovider.asp





"F176" <drawtree@hotmail.com> wrote in message
news:%23Rys%23ANOEHA.3000@tk2msftngp13.phx.gbl...
> I'm making a databse management tool with VS.NET 2003 C#.
> The InvalidOperationException occured RANDOMLY.
>
> "A connection pooling error has occurred."
>
> I'm accessing SQL server 2000 (MSDE Release A) through SqlConnection.
> The database that I'm using is set as SINGLE USER by EM.
> So I created one connection object and reused it repeatly.
> (Connection is keeping open during application is running.)
> No exception when working and running, but the exception thrown when
> application closing. (Exactly, when SqlConnection.Close () method called.)
>
> I searched ms .net newsgroup (by google), I know I have not to use
> SqlConnection.Close() in any destructor routine, and my code has no
> destructor at all project. (Even no "~" character on whole sources.)
> I didn't call Close() method at any destructor, and Close () method is
> places on Dispose() method currently.
>
> My SqlConnection is wrapped by a component that placed on a form by the
> designer.
>
>
>
> PS.
> I have to use SINGLE USER option, cause there is special reason, please
> don't discuss about it.
>
>
>
>
>
>
>
> THIS IS EXCEPTION DETAILS:
>
> - $exception {System.InvalidOperationException}
> System.InvalidOperationException
> - System.SystemException {"A connection pooling error has occurred."}
> System.SystemException
> - System.Exception {"A connection pooling error has occurred." }
> System.Exception
> System.Object {System.InvalidOperationException} System.Object
> _className null string
> _COMPlusExceptionCode -532459699 int
> _exceptionMethod <undefined value> System.Reflection.MethodBase
> _exceptionMethodString null string
> _helpURL null string
> _HResult -2146233079 int
> _innerException { } System.Exception
> _message "A connection pooling error has occurred." string
> _remoteStackIndex 0 int
> _remoteStackTraceString null string
> _source null string
> + _stackTrace {System.Array} System.Object
> _stackTraceString null string
> _xcode -532459699 int
> _xptrs 0 int
> HelpLink null string
> HResult -2146233079 int
> InnerException { } System.Exception
> Message "A connection pooling error has occurred." string
> Source "System.Data" string
> StackTrace " at System.Data.SqlClient.SqlConnection.Close()\r\n at
> F176.Database.Generator.Dispose()\r\n at
> F176.Database.Server.Dispose()\r\n at
> F176.Database.Manager.Dispose(Boolean disposing)\r\n at
> System.ComponentModel.Component.Finalize()" string
> + TargetSite {System.Reflection.RuntimeMethodInfo}
> System.Reflection.MethodBase
> + this {F176.Database.Generator} F176.Database.Generator
>
>
>
>



Re: "A connection pooling error has occurred." exception thrown randomly when SqlConnection.Close(). (In Dispose() method) by Scott

Scott
Thu May 13 07:31:04 CDT 2004

If you have no option but to run in single user mode and leave a
connection open, then pooling serves no useful purpose. Perhaps add:

Pooling=false

to the connection string to disable completely.

--
Scott
http://www.OdeToCode.com

On Thu, 13 May 2004 18:54:04 +0900, "F176" <drawtree@hotmail.com>
wrote:

>I'm making a databse management tool with VS.NET 2003 C#.
>The InvalidOperationException occured RANDOMLY.
>
> "A connection pooling error has occurred."
>
>I'm accessing SQL server 2000 (MSDE Release A) through SqlConnection.
>The database that I'm using is set as SINGLE USER by EM.
>So I created one connection object and reused it repeatly.
>(Connection is keeping open during application is running.)
>No exception when working and running, but the exception thrown when
>application closing. (Exactly, when SqlConnection.Close () method called.)
>
>I searched ms .net newsgroup (by google), I know I have not to use
>SqlConnection.Close() in any destructor routine, and my code has no
>destructor at all project. (Even no "~" character on whole sources.)
>I didn't call Close() method at any destructor, and Close () method is
>places on Dispose() method currently.
>
>My SqlConnection is wrapped by a component that placed on a form by the
>designer.
>
>
>
>PS.
>I have to use SINGLE USER option, cause there is special reason, please
>don't discuss about it.


Re: "A connection pooling error has occurred." exception thrown randomly when SqlConnection.Close(). (In Dispose() method) by F176

F176
Thu May 13 16:01:27 CDT 2004

Thanks.
With your reply, I can make pooling off surely.





"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:ohq6a0h0edmnv89rfqj2ihi5nq2bikoqkg@4ax.com...
> If you have no option but to run in single user mode and leave a
> connection open, then pooling serves no useful purpose. Perhaps add:
>
> Pooling=false
>
> to the connection string to disable completely.
>
> --
> Scott
> http://www.OdeToCode.com
>
> On Thu, 13 May 2004 18:54:04 +0900, "F176" <drawtree@hotmail.com>
> wrote:
>
> >I'm making a databse management tool with VS.NET 2003 C#.
> >The InvalidOperationException occured RANDOMLY.
> >
> > "A connection pooling error has occurred."
> >
> >I'm accessing SQL server 2000 (MSDE Release A) through SqlConnection.
> >The database that I'm using is set as SINGLE USER by EM.
> >So I created one connection object and reused it repeatly.
> >(Connection is keeping open during application is running.)
> >No exception when working and running, but the exception thrown when
> >application closing. (Exactly, when SqlConnection.Close () method
called.)
> >
> >I searched ms .net newsgroup (by google), I know I have not to use
> >SqlConnection.Close() in any destructor routine, and my code has no
> >destructor at all project. (Even no "~" character on whole sources.)
> >I didn't call Close() method at any destructor, and Close () method is
> >places on Dispose() method currently.
> >
> >My SqlConnection is wrapped by a component that placed on a form by the
> >designer.
> >
> >
> >
> >PS.
> >I have to use SINGLE USER option, cause there is special reason, please
> >don't discuss about it.
>