查询数据库表的所有字段
using (OleDbConnection Conn = new OleDbConnection(Connect.Str))
{
Conn.Open();
System.Data.OleDb.OleDbCommand cmd = new OleDbCommand(sql, Conn);
System.Data.OleDb.OleDbDataReader reader = cmd.ExecuteReader();
reader.Read();
ed.WriteMessage("\n" + reader.FieldCount );
for (int i = 0; i <= reader.FieldCount - 1; i++)
{
ed.WriteMessage("\n" +reader.GetName(i)); //获取所有字段以后还要存到这里面
}
}