Added Open/Close to transaction
This commit is contained in:
parent
4fa9884f88
commit
ce0d48709d
@ -96,6 +96,8 @@ namespace ChaosBot.Database
|
|||||||
SqliteCommand command = _conn.CreateCommand();
|
SqliteCommand command = _conn.CreateCommand();
|
||||||
SqliteTransaction transaction;
|
SqliteTransaction transaction;
|
||||||
|
|
||||||
|
_conn.Open();
|
||||||
|
|
||||||
// Start a local transaction.
|
// Start a local transaction.
|
||||||
transaction = _conn.BeginTransaction();
|
transaction = _conn.BeginTransaction();
|
||||||
|
|
||||||
@ -138,6 +140,7 @@ namespace ChaosBot.Database
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_conn.Close();
|
||||||
return cmds.Count;
|
return cmds.Count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user