You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this below the call to cn.ChangeDatabase fails because the connection is not yet open - it needs moving to after the cn.Open()
try
{
if (!database.Equals("master", StringComparison.InvariantCultureIgnoreCase))
{
cn.ChangeDatabase(database);
}
var sqlBatch =string.Empty;
var cmd = new SqlCommand(string.Empty, cn);
cn.Open();
The text was updated successfully, but these errors were encountered:
In this below the call to cn.ChangeDatabase fails because the connection is not yet open - it needs moving to after the cn.Open()
The text was updated successfully, but these errors were encountered: