fix attach

This commit is contained in:
Luke Pulverenti 2016-05-24 14:28:58 -04:00
parent 1c72fcd17f
commit 18b8f4d8d4

View File

@ -122,7 +122,10 @@ namespace MediaBrowser.Server.Implementations.Persistence
{ {
using (var cmd = db.CreateCommand()) 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(); cmd.ExecuteNonQuery();
} }
} }