sql and pooled connection error
Posted
by user319075
on Stack Overflow
See other posts from Stack Overflow
or by user319075
Published on 2010-04-17T05:56:21Z
Indexed on
2010/04/17
6:03 UTC
Read the original article
Hit count: 296
Dear all,
Kindly look at the following code as this sample code gives an error when i hosted it on Hostexcellence , but locally it runs perfect, and the error is as the following:
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
SqlDataSource1.SelectCommand = "Select Top (3) * from News Order by NewsID Desc";
SqlDataSource1.DataSourceMode = SqlDataSourceMode.DataReader;
SqlDataReader r_News = (SqlDataReader)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
DataGrid_News.DataSource = r_News;
r_News.Close();
DataGrid_News.DataBind();
So What's wrong with that code ??
© Stack Overflow or respective owner