Beispiel #1
0
 public MysqlControl(Mysql_options options)
 {
     con_opt      = options;
     mysql_status = false;
     if (check_options(options))
     {
         Connection_string = "Database=" + options.dbname + ";Data Source=" + options.host + ";User Id=" + options.login + ";Password=" + options.password;
         if (check_connection())
         {
             mysql_status = true;
         }
     }
 }
Beispiel #2
0
        private bool check_options(Mysql_options options)
        {
            bool status = true;

            if (options.host == String.Empty || options.host == "")
            {
                status = false;
            }
            if (options.login == String.Empty || options.login == "")
            {
                status = false;
            }
            if (options.password == String.Empty || options.password == "")
            {
                status = false;
            }
            if (options.dbname == String.Empty || options.dbname == "")
            {
                status = false;
            }
            return(status);
        }
Beispiel #3
0
 public MysqlControl()
 {
     con_opt = new Mysql_options();
 }