>SqlConnection NewCon = new SqlConnection(globalSqlConnection.ConnectionString); > >Dim NewCon as New SqlConnection(globalSqlConnection.ConnectionString) >I believe this is what I had before I made the change. I had something like this:
oCommand.Connection = oApp.aConnection(nConnectionString, 2)But, assigning the application connection to oCommand.Connection was making it to be used globally and collisions were presents. So, I change to this:
' Get the proper definition as per the current scope If oProcess Is Nothing Then oCommand.Connection = oApp.aConnection(nConnectionString, 2) Else oCommand.Connection = oProcess.aConnection(nConnectionString, 2) End IfWhere oProcess is the connection object which is created at every hit so no collision can occur.