public override Microsoft.SqlServer.Dts.Runtime.DTSExecResult Validate(Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents infoEvents)
    {
      if (string.IsNullOrEmpty(HostName))
      {
        return DTSExecResult.Failure;
      }
      else if (string.IsNullOrEmpty(VirtualHost))
      {
        return DTSExecResult.Failure;
      }
      else if (string.IsNullOrEmpty(UserName))
      {
        return DTSExecResult.Failure;
      }
      else if (string.IsNullOrEmpty(Password))
      {
        return DTSExecResult.Failure;
      }
      else if (Port <= 0)
      {
        return DTSExecResult.Failure;
      }

      return DTSExecResult.Success;
    }
Exemple #2
0
        public override Microsoft.SqlServer.Dts.Runtime.DTSExecResult Validate(Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents infoEvents)
        {
            if (string.IsNullOrWhiteSpace(ClientID))
            {
                return(DTSExecResult.Failure);
            }
            else if (string.IsNullOrWhiteSpace(RedirectUri))
            {
                return(DTSExecResult.Failure);
            }
            else if (string.IsNullOrWhiteSpace(ResourceUri))
            {
                return(DTSExecResult.Failure);
            }
            else if (string.IsNullOrWhiteSpace(OAuth2AuthorityUri))
            {
                return(DTSExecResult.Failure);
            }
            else if (string.IsNullOrWhiteSpace(PowerBIDataSets))
            {
                return(DTSExecResult.Failure);
            }
            else if (string.IsNullOrWhiteSpace(UserName))
            {
                return(DTSExecResult.Failure);
            }
            else if (string.IsNullOrWhiteSpace(Password))
            {
                return(DTSExecResult.Failure);
            }


            return(DTSExecResult.Success);
        }
        private Microsoft.SqlServer.Dts.Runtime.DTSExecResult HandleValidationError(Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents infoEvents, string message)
        {
            if (infoEvents != null)
            {
                infoEvents.FireError(0, "MongoConnectionManager", message, string.Empty, 0);
            }

            return(DTSExecResult.Failure);
        }
Exemple #4
0
 /// <summary>
 /// Validates required properties.
 /// </summary>
 /// <param name="infoEvents"></param>
 /// <returns></returns>
 public override Microsoft.SqlServer.Dts.Runtime.DTSExecResult Validate(Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents infoEvents)
 {
     if (String.IsNullOrEmpty(_connectionString))
     {
         infoEvents.FireError(0, "CRM Connection Manager", "No connection specified", String.Empty, 0);
         return(DTSExecResult.Failure);
     }
     else
     {
         return(DTSExecResult.Success);
     }
 }
 /// <summary>
 /// Validates the connection and returns an enumeration that indicates success or failure.
 /// </summary>
 /// <param name="infoEvents"> An object that implements the Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents events interface to raise errors, warning, or informational events.</param>
 /// <returns>A Microsoft.SqlServer.Dts.Runtime.DTSExecResult enumeration.</returns>
 public override Microsoft.SqlServer.Dts.Runtime.DTSExecResult Validate(Microsoft.SqlServer.Dts.Runtime.IDTSInfoEvents infoEvents)
 {
     if (string.IsNullOrWhiteSpace(_serverName))
     {
         return(HandleValidationError(infoEvents, "No server name specified"));
     }
     else if (string.IsNullOrWhiteSpace(_databaseName))
     {
         return(HandleValidationError(infoEvents, "No database name specified"));
     }
     else if (string.IsNullOrWhiteSpace(_password))
     {
         return(HandleValidationError(infoEvents, "No password specified"));
     }
     else if (string.IsNullOrWhiteSpace(_userName))
     {
         return(HandleValidationError(infoEvents, "No username specified"));
     }
     else
     {
         return(DTSExecResult.Success);
     }
 }