Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do you check connection on every call to SQL?
Message
From
09/03/2012 12:11:34
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01537347
Message ID:
01537753
Views:
36
>I am sure it is because I don't understand how it works. I thought that in order for my ASP.NET application to use the Connection pool I have to use a certain class of .NET, correct or not? So this is what I mean by "implement" is to call a method of this ASP.NET class that will use the connection pool. Am I completely off the target? Please let me know.

No, here is as simple as it gets:
                                Using loSQLConnection As New SqlConnection(oApp.aConnection(nConnectionString, 1))
                                    oCommand.Connection = loSQLConnection
                                    oDataAdapter.Fill(oDataSet)
                                End Using
This will open the connection for the query and close it after.

You will not have to worry about the pool.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform