protected override void InternalExecute() { if (string.IsNullOrEmpty(this.UserName) || string.IsNullOrEmpty(this.UserPassword)) { this.LogTaskMessage(MessageImportance.Low, "Using a Trusted Connection"); this.trustedConnection = true; } string conStr = this.trustedConnection ? string.Format(CultureInfo.CurrentCulture, @"Data Source={0};Initial Catalog={1};Integrated Security=True", this.MachineName, this.DatabaseName) : string.Format(CultureInfo.CurrentCulture, @"Data Source={0};Initial Catalog={1};UID={2};PWD={3}", this.MachineName, this.DatabaseName, this.UserName, this.UserPassword); using (this.databaseLinq = new SqlVersionDataClass(conStr)) { switch (this.TaskAction) { case "GetVersion": this.GetNextVersion(); break; default: this.Log.LogError(string.Format(CultureInfo.CurrentCulture, "Invalid TaskAction passed: {0}", this.TaskAction)); return; } } }