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;
}
}
}