更新时间:2023-02-07 23:20:28
根据您连接到 ms-access 文件的方式,您可以以不同的方式读取表和列/字段名称:
Depending on the way you are connecting to the ms-access fiele, you can read tables and column/field names in different ways:
使用 ODBC 连接,您可以列出 MS-ACCESS 系统表,打开每个表上的记录集,然后读取所有字段名称.可以使用以下 SQL 指令列出表:
With an ODBC connection, you can list the MS-ACCESS system tables, open a recordset on each table, and then read all field names. Tables can be listed with the following SQL instruction:
SELECT name FROM MSysObjects WHERE type = 1
SELECT name FROM MSysObjects WHERE type = 1
在所有情况下,一旦通过记录集打开表,您可以通过以下方式读取其字段名称循环记录集对象的字段集合
In all case, once a table is opened through a recordset, you can read its field names by looping on the fields collection of the recordset object