I an running a MSSQL database that is opened and closed continually within a permanent loop. The process runs within a backgroundworker. The process opens the database, scans for any changes, performs an action based on changes made to the database by other remote apps and then closes. The all APPEARS to run perfectly, however, each iteration does not close properly leaving the port open. This causes system to run crash after a while. I do issue the following instructions at the end of each iteration of the loop:
sqlreader.Close()
sqlconnect.Close()
SqlConnection.ClearPool(sqlconnect)
If you need more information I will provide extract from code
sqlreader.Close()
sqlconnect.Close()
SqlConnection.ClearPool(sqlconnect)
If you need more information I will provide extract from code