连接DB后的Connection释放顺序为:

1.DBConnection.Close(); 断开和DB的连接

2.DBConnection.Dispose(); 释放资源

3.DBConnection=null;

以上虽简单但重要。

 

相关文章: