| | |
Error : Timeout expired. ...... max pool size was reached
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Dec 2006
Posts: 8
Reputation:
Solved Threads: 0
I get the following error
"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."
The below code is in the click event of the Upload button. This works fine when it is executed the first time (for loop, loops thru around 100 records). However, when I click the button the second time, it displays the above error after looping around 6 to 8 times.
As far as I know, I am closing the connection.
What am I doing wrong?
Please help
- Artee
"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."
The below code is in the click event of the Upload button. This works fine when it is executed the first time (for loop, loops thru around 100 records). However, when I click the button the second time, it displays the above error after looping around 6 to 8 times.
As far as I know, I am closing the connection.
What am I doing wrong?
Please help
- Artee
vb.net Syntax (Toggle Plain Text)
Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click Dim con As New ConnectClass Dim myConnect As String Dim cmdString As String Dim i As Integer, j As Integer Dim ds1 As New DataSet Dim dv2 As New DataView ds1.Merge(mCSV.CSVDataSet.Tables(0).Copy) ds1.Clear() dv2 = New DataView(ds1.Tables(0)) For i = 0 To mCSV.CSVDataSet.Tables(0).DefaultView.Count - 1 cmdString = " Select * from SCHDB.dbo.DistrictAll " & _ " where DCode = '" & dgrdView1.Item(i, 0) & "'" Dim da As New SqlDataAdapter(cmdString, con.GetDBConnection) If da.SelectCommand.ExecuteReader.HasRows = False Then Else Dim drv As DataRowView = dv2.AddNew For j = 0 To 13 drv(ColNameCheck(j)) = dgrdView1.Item(i, j) Next End If da.Dispose() con.GetDBConnection.Dispose() Next dgrdUploadedAll.DataSource = dv2 con.GetDBConnection.Close() End Sub
![]() |
Similar Threads
- How to Connect MySQL from JSP Page (JSP)
- Timeout Expired (VB.NET)
- "Forbidden / You don't have permission to access / on this server." error (Linux Servers and Apache)
- Timeout error (ASP.NET)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- Page hangs or displays connection pooling max size error (ASP.NET)
- array max min (C++)
- “Windows Virtual Memory Size Too Low� in XP (Windows NT / 2000 / XP)
Other Threads in the VB.NET Forum
- Previous Thread: New in VB.net
- Next Thread: VB.NET Projects
| Thread Tools | Search this Thread |
.net .net2008 30minutes 2005 2008 access account arithmetic array basic beginner browser button buttons center check code component connectionstring crystalreport cuesent data database databasesearch datagrid datagridview date datetimepicker design designer dissertation dissertations dissertationtopic dropdownlist excel fade file-dialog filter folder forms ftp generatetags hardcopy html images input insert intel monitor net networking open output panel passingparameters peertopeervideostreaming picturebox picturebox1 port printing problem problemwithinstallation project reports" searchvb.net select serial settings shutdown sqlserver survey tcp temperature text textbox timespan toolbox transparency trim updown user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio.net visualstudio2008 web winforms wpf wrapingcode year





