Fix MySqlReader cleanup
This commit is contained in:
@@ -133,7 +133,7 @@ namespace MarketData.DataAccess
|
||||
finally
|
||||
{
|
||||
if(null!=sqlCommand)sqlCommand.Dispose();
|
||||
if (null != sqlDataReader) sqlDataReader.Close();
|
||||
if (null != sqlDataReader) {sqlDataReader.Close();sqlDataReader.Dispose();}
|
||||
if (null != sqlConnection) sqlConnection.Close();
|
||||
}
|
||||
}
|
||||
@@ -221,6 +221,7 @@ namespace MarketData.DataAccess
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (null != sqlDataReader) {sqlDataReader.Close();sqlDataReader.Dispose();}
|
||||
if(null!=sqlCommand)sqlCommand.Dispose();
|
||||
if (null != sqlConnection) sqlConnection.Close();
|
||||
}
|
||||
@@ -264,6 +265,7 @@ namespace MarketData.DataAccess
|
||||
{
|
||||
if(null!=sqlCommand)sqlCommand.Dispose();
|
||||
if (null != sqlConnection) sqlConnection.Close();
|
||||
if (null != sqlDataReader) {sqlDataReader.Close();sqlDataReader.Dispose();}
|
||||
}
|
||||
}
|
||||
public static DictionaryCollection GetDictionaryCollection()
|
||||
@@ -304,6 +306,7 @@ namespace MarketData.DataAccess
|
||||
{
|
||||
if(null!=sqlCommand)sqlCommand.Dispose();
|
||||
if (null != sqlConnection) sqlConnection.Close();
|
||||
if (null != sqlDataReader) {sqlDataReader.Close();sqlDataReader.Dispose();}
|
||||
}
|
||||
}
|
||||
private static bool DeleteDictionaryCollection(DictionaryCollection dictionaryCollection, MySqlConnection sqlConnection, MySqlTransaction sqlTransaction)
|
||||
|
||||
Reference in New Issue
Block a user