>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.