public void Run() { Global.UserRightProvider.CanDo(Right.RightItem.ManageDB); if (Parameters.Count != 1) { throw new ArgumentException("the number of parameters must be 1. Parameter 1 is tableName"); } string tableName = Parameters[0]; Data.DBProvider dbProvider = Data.DBProvider.GetDBProvider(tableName); if (dbProvider == null) { throw new StoredProcException(string.Format("Table name {0} does not exist!", Parameters[0])); } dbProvider.Detach(); OutputMessage(string.Format("Detach table {0} successul.", tableName)); }