| | |
Error : Timeout expired. ...... max pool size was reached
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
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 2005 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic dropdownlist excel exists fade filter forms ftp generatetags html images input insert intel internet listview mobile module monitor net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex right-to-left save search searchvb.net select serial settings shutdown soap socket sqldatbase sqlserver survey temperature textbox timer timespan transparency trim txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet visual visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





