From a2dddc1c4c40a3b235eb3ff3f5039c084234745e Mon Sep 17 00:00:00 2001 From: Metin Celik Date: Tue, 30 Dec 2025 05:50:36 +0100 Subject: [PATCH] Ensure commands use the active transaction in CCoverDB (#825) --- Vocaluxe/Lib/Database/CCoverDB.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Vocaluxe/Lib/Database/CCoverDB.cs b/Vocaluxe/Lib/Database/CCoverDB.cs index dcc76a3b..11c0cbf8 100644 --- a/Vocaluxe/Lib/Database/CCoverDB.cs +++ b/Vocaluxe/Lib/Database/CCoverDB.cs @@ -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);