//打开数据库 con.Open(); //读取数据 OdbcDataReader reader = cmd.ExecuteReader(); //把数据加载到临时表 dt.Load(reader); //在使用完毕之后,一定要关闭,要不然会出问题 reader.Close();