Example #1
0
        public void Validate()
        {
            ConnectionValidationResult r =
                SqlServerScriptProcessor.ValidateConnectionSettings(this);

            IsValid      = r.IsValid;
            ErrorMessage = r.Message;
        }
Example #2
0
        static public ConnectionValidationResult ValidateConnectionSettings(OracleConnectionSettings cs)
        {
            ConnectionValidationResult result = new ConnectionValidationResult(true, string.Empty);

            foreach (string schema in cs.Schema)
            {
                string connectionMinusPassword = string.Empty;
                string arguments = GetConnectionString(schema, cs.Instance, cs.Port, cs.Database, ref connectionMinusPassword);
                arguments = " -l " + arguments;
                ConnectionValidationResult r = ValidateConnectionSettings(arguments);
                result.IsValid &= r.IsValid;
                result.Message += string.Format("\r\n{1}:{0}", r.Message, schema);
            }
            result.Message.Trim();

            return(result);
        }