W
www.gusse.net
Have just switch from 1.1 to framework 2.0 and i´m getting this error :
Attempted to read or write protected memory. This is often an indication
that other memory is corrupt
anyone have a clu why ?
happens inside this :
public bool ExecSql(string sql)
{
bool ReturnValue = false;
OpenConnection();
OleDbCommand myCommand = new OleDbCommand(sql,oDatabaseConnection);
try
{
try
{
log.Debug("[ExecSql] SQL (ExecuteNonQuery): " + sql);
//OleDbTransaction myTrans =
oDatabaseConnection.BeginTransaction(IsolationLevel.ReadCommitted);
if (myTrans!=null)
myCommand.Transaction = myTrans;
myCommand.ExecuteNonQuery();
//myTrans.Commit();
ReturnValue = true;
}
catch (Exception ex)
{
log.Error("[ExecSql] Fatal error : " + ex.Message + " - " + sql);
}
}
finally
{
GC.Collect();
GC.WaitForPendingFinalizers();
}
return ReturnValue;
}
Attempted to read or write protected memory. This is often an indication
that other memory is corrupt
anyone have a clu why ?
happens inside this :
public bool ExecSql(string sql)
{
bool ReturnValue = false;
OpenConnection();
OleDbCommand myCommand = new OleDbCommand(sql,oDatabaseConnection);
try
{
try
{
log.Debug("[ExecSql] SQL (ExecuteNonQuery): " + sql);
//OleDbTransaction myTrans =
oDatabaseConnection.BeginTransaction(IsolationLevel.ReadCommitted);
if (myTrans!=null)
myCommand.Transaction = myTrans;
myCommand.ExecuteNonQuery();
//myTrans.Commit();
ReturnValue = true;
}
catch (Exception ex)
{
log.Error("[ExecSql] Fatal error : " + ex.Message + " - " + sql);
}
}
finally
{
GC.Collect();
GC.WaitForPendingFinalizers();
}
return ReturnValue;
}