访问访问设计视图字段说明

Access Access Design View field descriptions

我有一个 Access 数据库,其中的字段描述(理论上)在设计视图中可见。我没有访问权限的副本。我可以使用 mdbtools 导出数据和模式,但描述中没有这些。有没有办法以编程方式提取这些描述?

原来有一个 un/under-documented mdbutils 命令会为 table:mdb-prop 提供元数据。这是一个 shell 脚本,它将列出每个字段的元数据,改编自我忘记出处的脚本:

#!/usr/bin/env bash
# Usage: mdb-export-all.sh full-path-to-db

command -v mdb-tables >/dev/null 2>&1 || {
    echo >&2 "I require mdb-tables but it's not installed. Aborting.";
    exit 1;
}

command -v mdb-export >/dev/null 2>&1 || {
    echo >&2 "I require mdb-export but it's not installed. Aborting.";
    exit 1;
}

fullfilename=
filename=$(basename "$fullfilename")
dbname=${filename%.*}

mkdir "$dbname"

IFS=$'\n'
for table in $(mdb-tables -1 "$fullfilename"); do
    echo "Check table $table"

    # Save a file with with all metadata for every field
    mdb-prop "$fullfilename" "$table" > "$dbname/$table.txt"

    # Save a file with with just the descriptions:
    cat "$dbname/$table.txt" | grep -E 'name|Description' > "$dbname/info_$table.txt"
done