Open connection before checking if table exists

This commit is contained in:
Sebastiaan Janssen
2012-12-05 14:43:37 -01:00
parent 8210666d30
commit 6a92b400b8

View File

@@ -161,6 +161,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
public override bool DoesTableExist(Database db, string tableName)
{
db.OpenSharedConnection();
var result =
db.ExecuteScalar<long>("SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES " +
"WHERE TABLE_NAME = @TableName AND " +