Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing an application
Message
De
30/08/2011 10:54:36
 
 
À
30/08/2011 10:42:57
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01522144
Message ID:
01522277
Vues:
28
>I don't think that the level at which CloseForm() is called should be a problem. But it does seem as if you are calling the CloseForm() whilst the SQL connection is still open? It may not be the cause of the problem but it would certainly be better practice to ensure that it is closed before the routine exits........

The Framework.Framework.Data class, which is referenced here as loDataProvider, from its SQLExec() method, uses the Using approach to make sure to open and close the connection once done such as:
                                Using loSQLConnection As New SqlConnection(oApp.aConnection(nConnectionString, 1))
                                    oCommand.Connection = loSQLConnection
                                    oDataAdapter.Fill(oDataSet)
                                End Using
The same goes with the Update class:
                                Using loSQLConnection As New SqlConnection(oApp.aConnection(nConnectionString, 1))
                                    loSQLConnection.Open()
                                    oCommand.Connection = loSQLConnection
                                    nResult = oDataAdapter.SelectCommand.ExecuteNonQuery()
                                End Using
So, connections only lives for their process. They are being released from memory right after.

I moved the related code to the higher chain. I will see how it goes.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform