日期:2014-05-17 浏览次数:20847 次
MySqlConnection conn = new MySqlConnection("Server=localhost;Database=t;port=3306;User Id=root;Password=''");
conn.Open();
MySqlDataAdapter mda = new MySqlDataAdapter(sql, conn);
DataTable dt = new DataTable();
mda.Fill(dt);
conn.Close();
return dt;