I am using SQL Server 2008 R2 with C# running VS2010 The Code that gives the Error is this: StringBuilder sb = new StringBuilder(); try { sb.AppendLine(string.Format("Starting to create {0} with login to {1}", this.tbDBName.Text, this.tbBTSAppUser.Text)); sb.AppendLine("Connecting to DB Server"); this.tbProgress.Text = sb.ToString(); this.tbProgress.ScrollToCaret(); //Connect to the local, default instance of SQL Server. string srvname = this.cbServers.SelectedItem as string; Server srv; if (srvname == null) { srv = new Server(); sb.AppendLine("Connected to local SQL server"); } else { srv = new Server(srvname); sb.AppendLine(string.Format("Connected to {0}", srvname)); } this.tbProgress.Text = sb.ToString(); this.tbProgress.ScrollToCaret(); //Define a Database object variable by supplying the server and the database name arguments in the constructor. Database db = srv.Databases[this.tbDBName.Text.Trim()]; if (db != null) { if (MessageBox.Show(string.Format("The '{0}' already exists do you want to drop it?", this.tbDBName.Text), "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { db.Drop(); } else { if (MessageBox.Show(string.Format("Create the Tables and Stored Procedures for BT Error Manager on '{0}'?", this.tbDBName.Text), "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { sb.AppendLine("Creating the Tables and Stored Procedures."); this.tbProgress.Text = sb.ToString(); db.ExecuteNonQuery(dbstring); string ConnectionString = "Integrated Security=SSPI;" + sb.AppendLine(string.Format("Created the Tables and Stored Procedures for BT Error Manager on '{0}'", this.tbDBName.Text));