I tried everything, but always , it returns me a System.NullreferencesException at "com.Transaction = trx;"
public override int ExecuteNonQuery(string query)
{
int register=0;
SQLiteTransaction trx=null;
SQLiteCommand com;
try
{
if (this.IsClosed()) this.Open();
trx = con.BeginTransaction();
com = new SQLiteCommand(query, con);
com.Transaction = trx;
register = com.ExecuteNonQuery();
trx.Commit();
return register;
}
catch (SQLiteException ex)
{
trx.Rollback();//se tiene q deshaser toda la trransaccion hecha
throw ex;
}
finally
{
this.Close();
}
}
i dont figure out where my error is :(
here is the exception that throws me in transaction
Update:
Here are are The Exception Detalis
i fix it, the problem was with transaction, i think that sqlite doesn't support that, i commented it and all works like a charm.