public void Install(string masterConnectionString, string newDatabaseName, string newDatabaseConnectionString) { SqlServers.CreateDatabase(masterConnectionString, newDatabaseName); DateTime startTime = DateTime.Now; while (DateTime.Now.Subtract(startTime).TotalSeconds < 9) { Application.DoEvents(); } try { UpgradeInstaller.UpgradeDatabase(newDatabaseConnectionString, true); } catch (Exception ex) { System.Threading.Thread.Sleep(8000); try { UpgradeInstaller.UpgradeDatabase(newDatabaseConnectionString, true); } catch { throw; } } }
public void Install() { if (IdentifyDatabaseConnectionString()) { UpgradeInstaller.UpgradeDatabase(_connectionString, _newInstall); } }
public override void Install(System.Collections.IDictionary stateSaver) { base.Install(stateSaver); if (IdentifyDatabaseConnectionString()) { UpgradeInstaller.UpgradeDatabase(_connectionString, _newInstall); } }