Showing posts with label solve. Show all posts
Showing posts with label solve. Show all posts

Sunday, March 25, 2012

Connection pooling problem

Can anybody help me to solve this problem

I have a web application. In this app i have one class genral for database transections. I create new object of this class on every page in page load event & dispose it on UnLoad event. After sometime this app gives connection pooling exception.

Means connection are not closed, but i disposed the object like

tmpDatabase.Dispose()
tmpDatabase = Nothing

Plz can anybody tell me the mistake i m doing.

ThanxPersonally, I would contruct the object as late as possible (where needed) and destroy the object as soon as possible, and let connection pooling work as designed.

Perhaps there is som error condition that you are not handling, so that the dispose is sometimes not reached.|||I can see using Break point, it destroying the object. Means cursor reaching to the line where the object is destroyed.|||Please Help me

This is big problem for my application. I dont know what i doing wrong.|||"This is big problem for my application. I dont know what i doing wrong."

We do not either. In general, there is some reason why your connections are not being closed. Could be an error condition not properly handled, could be a design problem. Absent seeing much of the code, and absent you taking my advice to make the Open and Close very close to each other, leaving the connection open for as short a time as possible rather than creating one for a page load/unload cycle, I do not think anyone can help you.

Monday, March 19, 2012

connection leak

Hi, in my web application i had a connection leak now that i solve this problem, i want to check if all connections are really closed.

I make a connection to an sql database.

I try on the database the sp_who procedue but i think, this is not that i can see if i colse all, connections

is there a other way to check or see if all connections are closed.

Enclosing the connection objects inside the "Using" block will make sure that the connection object is disposed off properly preventing any connection leaks. For e.g:

using(SqlConnection cn = new SqlConnection())

{

//DAL code

}


Check this out for details:

codebetter.com/blogs/john.papa/archive/2005/04/01/60984.aspx

Hope this helps,

Vivek

Friday, February 17, 2012

Connection

Hi I'm George and I have a problem wich I can't solve:
when I install a CMS wich uses MSDE il get the Message this is not a trusted
SQLConnection..blablabla...
What can I do ' Please help me.George wrote:
> Hi I'm George and I have a problem wich I can't solve:
> when I install a CMS wich uses MSDE il get the Message this is not a
> trusted SQLConnection..blablabla...
> What can I do ' Please help me.
You can add your local Windows login or Domain Login to SQL Server. To
do this, run SQL Enterprise Manager and add a new login and map it to
the domain/Windows login (under the Security node).
--
David Gugick
Quest Software
www.imceda.com
www.quest.com