By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

.net 1.1, open connections in nested repeaters

P: n/a
Hi,

I have nested repeaters. But the page breaks if I refresh 2 or 3 times. It
breaks with the following error message..
"Timeout expired. The timeout period elapsed prior to obtaining a connection
from the pool. This may have occurred because all pooled connections were in
use and max pool size was reached. "

I am using the following lines for loading data in the child repeaters on
Item_DataBound of Parent Repeater.

using (SqlConnection oConn = new SqlConnection(ConnectionStrings.Portal))
{
SqlCommand oCmd = new SqlCommand(strSql, oConn);
oConn.Open();
SqlDataReader cmDataReader = oCmd.ExecuteReader();
Repeater tempRepeater = (Repeater) rItem.FindControl("_childRepeater");
if (tempRepeater != null)
{
tempRepeater.DataSource = cmDataReader;
tempRepeater.DataBind();
}
cmDataReader.Close();
oCmd.Dispose();
}

What am I doing wrong?


Jul 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Please ignore this post.

Thnx

"mavrick_101" wrote:
Hi,

I have nested repeaters. But the page breaks if I refresh 2 or 3 times. It
breaks with the following error message..
"Timeout expired. The timeout period elapsed prior to obtaining a connection
from the pool. This may have occurred because all pooled connections were in
use and max pool size was reached. "

I am using the following lines for loading data in the child repeaters on
Item_DataBound of Parent Repeater.

using (SqlConnection oConn = new SqlConnection(ConnectionStrings.Portal))
{
SqlCommand oCmd = new SqlCommand(strSql, oConn);
oConn.Open();
SqlDataReader cmDataReader = oCmd.ExecuteReader();
Repeater tempRepeater = (Repeater) rItem.FindControl("_childRepeater");
if (tempRepeater != null)
{
tempRepeater.DataSource = cmDataReader;
tempRepeater.DataBind();
}
cmDataReader.Close();
oCmd.Dispose();
}

What am I doing wrong?

Jul 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.