469,140 Members | 1,355 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,140 developers. It's quick & easy.

.net 1.1, open connections in nested repeaters

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
1 1204
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.

Similar topics

reply views Thread by Machi | last post: by
reply views Thread by kettch | last post: by
2 posts views Thread by Matt Jensen | last post: by
4 posts views Thread by =?Utf-8?B?SmFtZXMgR2V1cnRz?= | last post: by
2 posts views Thread by Josh | last post: by
PrinsonG
1 post views Thread by PrinsonG | last post: by
1 post views Thread by andrew.douglas11 | last post: by
3 posts views Thread by Leon Mayne | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.