Ensure commands use the active transaction in CCoverDB (#825)

This commit is contained in:
Metin Celik authored and GitHub committed 2025-12-30 05:50:36 +01:00
1 parent 9fbcc077ff
commit a2dddc1c4c
1 file changed
+3
+3
View File
@@ -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);