Public Function QueryDataSet(ByVal strSQL As String) As DataSet
Dim ds As New DataSet
Dim dtAdapter As New SqlDataAdapter
objConn = New SqlConnection
With objConn
.ConnectionString = strConn
.Open()
End With
objCmd = New SqlCommand
With objCmd
.Connection = objConn
.CommandText = strSQL
.CommandType = CommandType.Text
End With
dtAdapter.SelectCommand = objCmd
dtAdapter.Fill(ds)
objConn.Close()
objConn.Dispose()
SqlConnection.ClearPool(objConn)
objConn = Nothing
Return ds
End function
如何解決我的功能解決了最大池大小是完全在我的服務器上?
請幫幫我。
可能的重複http://stackoverflow.com/questions/15848239/how-to-solve-max-connection-pool-error –
請複製/粘貼確切的錯誤信息 –
可能的重複[如何解決連接問題ASP.NET和SQL Server之間的池問題?](http://stackoverflow.com/questions/670774/how-can-i-solve-a-connection-pool-problem-between-asp-net-and-sql-服務器) –