Hello dears,
I m facing below mentioned Error in my application.
where as all my database connections are closed.
my code is as under:
i have made a function that is being used with each type of query in my application.
Public Function exeQuery(ByVal query As String) As String
Dim msg As String
Try
connect()
fComm = New SqlCommand(query, fConn)
fComm.ExecuteNonQuery()
fConn.Close()
fConn.Dispose()
Return "1"
Catch ex As Exception
fConn.Close()
msg = ex.Message.ToString()
Return msg
Finally
fConn.Close()
End Try
End Function
'Execute Insert, Update and Delete Queries
but when 3 or 4 person use this at the same time it gives the error.
Please suggest me most convenient way at earliest.
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: 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.
Best Regards,
Naveed