Need Help with DAB v1.0

S

Shimon Sim

I have big application that uses first version of DAB. It could be just
regular performance problem though.

I just noticed that I have major problem with connection pooling.
My connection string saved in web.config file so it should be the same for
all the connections.
I use a lot of SqlDataReader s since it is web application and try to stick
to following code
using(SqlDataReader rd=...)//this line is my class with method but it boils
down to ExecuteReader of SqlHelper class
{
//populating repeater
rpt.DataSource=rd;
rpt.DataBind();
}
Amount of connection grows to 30+ within first min of fast clicking between
links.
I also checks using my NUnit tests the same problem (event with
ExecuteNonQuery(...))
Please if anyone can still help with the first version. I don't know where
could be the problem.
Thank a lot.
Shimon.
 
K

Kevin Yu [MSFT]

Hi Shimon,

Based on your description, it seems that you didn't close the connection
after using it. Could you post your code here to let me know how you called
ExecuteReader?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
S

Shimon Sim

I use following code through my application
using(SqlDataReader rd=MyClass.List())
{
rptList.DataSource=rd;
rptList.DataBind();
}

code in MyClass.List() is
public SqlDataReader List()
{
return SqlHelper.ExecutreReader(Helper.ConnString,somrSp,parameters);
}
Thank you
 
K

Kevin Yu [MSFT]

Hi Shimon,

I tried your code on my machine, it works fine and the amout of open
connection is not rising when I check it in the performance monitor. Are
you using dynamic connection strings every time? I am using a static
connection string, so that the connections are get from one pool. Could you
show me your connection string?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top