| | |
Error : Timeout expired. ...... max pool size was reached
![]() |
•
•
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
- "Forbidden / You don't have permission to access / on this server." error (Linux Servers and Apache)
- How to Connect MySQL from JSP Page (JSP)
- Timeout Expired (VB.NET)
- 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
Views: 10210 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2005 2008 access ado.net application array arrays basic bindingsource browser c# center checkbox client code combobox connection control convert crystal crystalreport data database datagrid datagridview dataset datatable date datetimepicker design designer dissertation dissertations error excel extrememl file form gridview image images insert lib listview login loops mobile ms msaccess net objects openxml path port print printing problem read save search searchbox security serial server settings sms socket sorting sql statement studio syntax tagging tags textbox time timer type update upload user validation vb vb.net vb2008 view visual visual-studio visualbasic visualbasic.net visualstudio2008 vs2008 web webbrowser windows winforms wpf xml





