private DataTable dt;//存储select方法的查询信息 public DBManager() { FileInfoRead read = new FileInfoRead(); string connStr = "server= 127.0.0.1; user=root; password=123456; database=concentrator; charset=utf8"; if (conn == null) { conn = new MySqlConnection(); conn.ConnectionString = connStr; } }
private DataTable dt;//存储select方法的查询信息 public DBManager() { FileInfoRead read = new FileInfoRead(); string connStr = "server= " + read.ip + ";user="******";password="******";database=" + read.database + ";charset=" + read.charset; if (conn == null) { conn = new MySqlConnection(); conn.ConnectionString = connStr; } //conn.Open(); }