Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do you check connection on every call to SQL?
Message
De
09/03/2012 12:11:34
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01537347
Message ID:
01537753
Vues:
37
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform