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; } } }
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); }
public MysqlControl() { con_opt = new Mysql_options(); }