G
Guest
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?
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?