sql and pooled connection error
- by user319075
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 ??