From 178a5f6978c417b3209c27bb9bde184749a9ef58 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 24 May 2016 14:28:58 -0400 Subject: [PATCH] fix attach --- .../Persistence/DataExtensions.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs b/MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs index 103b75f84..61ce6e351 100644 --- a/MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs +++ b/MediaBrowser.Server.Implementations/Persistence/DataExtensions.cs @@ -122,7 +122,10 @@ namespace MediaBrowser.Server.Implementations.Persistence { using (var cmd = db.CreateCommand()) { - cmd.CommandText = string.Format("attach '{0}' as {1};", path, alias); + cmd.CommandText = string.Format("attach @dbPath as {0};", alias); + cmd.Parameters.Add(cmd, "@dbPath", DbType.String); + cmd.GetParameter(0).Value = path; + cmd.ExecuteNonQuery(); } }