Ensure commands use the active transaction in CCoverDB (#825)
This commit is contained in:
1 parent
9fbcc077ff
commit
a2dddc1c4c
1 file changed
+3
@@ -78,6 +78,9 @@ namespace Vocaluxe.Lib.Database
|
||||
using (var command = new SqliteCommand())
|
||||
{
|
||||
command.Connection = _Connection;
|
||||
// If we have an open transaction on this connection, all commands must use it.
|
||||
if (_TransactionCover != null)
|
||||
command.Transaction = _TransactionCover;
|
||||
command.CommandText = "SELECT id, width, height FROM Cover WHERE [Path] = @path";
|
||||
command.Parameters.Clear();
|
||||
command.Parameters.AddWithValue("@path", coverPath);
|
||||
|
||||
Reference in new issue
Block a user