[FireDAC][Phys][FB] 文件不是有效的数据库
[FireDAC][Phys][FB] file is not a valid database
我在通过 FireDAC.FB-Driver 访问 GDB 数据库时遇到问题。
奇怪的是,如果我在设计时设置连接,一切正常
DriverID = FB
Server = 127.0.0.1
Protocol = TCPIP
如果我在运行时尝试相同的连接参数,但它会给我一个 [FireDAC][Phys][FB] file is not a valid database
-错误。
单位 FireDAC.Phys.FB
FireDAC.Phys.FBDef
都包括在内。我什至尝试将所有可能的 dll 文件设置为 VendorLib
,但它没有改变任何东西。
我知道 *.GDB 通常是一个 InterBase-DataBase,但我有一个 FireBird-Server 运行,据我所知,通过 FB-Driver 访问应该有效,因为它在指定连接时有效设计时间。
Firebird 服务器版本为 2.5.3.26778 32 位
Delphi版本为XE7
补充编辑:数据库文件的 ODS 为 11.2 (Firebird 2.5/InterBase 7.5)
知道我做错了什么吗?
尽管 InterBase 和 Firebird 有共同的传统并共享很多术语,但它们并不相同。从 Firebird 1.5 开始,ODS 版本控制出现了分歧。尽管 Firebird 1.5 和 InterBase 6.1 都有 ODS 10.1,但这些 ODS 版本不同且不兼容,对于 Firebird 2.5 和 InterBase 7.5(它们都有 ODS 版本 11.2)更是如此。
因此,如果您尝试使用 Firebird 2.5 打开 InterBase 7.5 数据库它将无法工作并且 Firebird 将报告数据库无效(反之亦然,InterBase 将报告类似如果您尝试打开 Firebird 数据库会出错)。
在技术层面上,这是通过屏蔽 ODS 版本在 Firebird 中实现的,因此它们与 InterBase 的版本不同:
Hds_ods_version
: Two bytes, unsigned. Bytes 0x12 and 0x13 on the page. The ODS major version for the database. The format of this word is the ODS major version ANDed with the Firebird flag of 0x8000. In the example below, the value is 0x800b for ODS version 11. The minor ODS version is held elsewhere in the header page - see hdr_ods_minor
below.
发件人:Inside a Firebird Database → Database Header Page - Type 0x01
我在通过 FireDAC.FB-Driver 访问 GDB 数据库时遇到问题。 奇怪的是,如果我在设计时设置连接,一切正常
DriverID = FB
Server = 127.0.0.1
Protocol = TCPIP
如果我在运行时尝试相同的连接参数,但它会给我一个 [FireDAC][Phys][FB] file is not a valid database
-错误。
单位 FireDAC.Phys.FB
FireDAC.Phys.FBDef
都包括在内。我什至尝试将所有可能的 dll 文件设置为 VendorLib
,但它没有改变任何东西。
我知道 *.GDB 通常是一个 InterBase-DataBase,但我有一个 FireBird-Server 运行,据我所知,通过 FB-Driver 访问应该有效,因为它在指定连接时有效设计时间。
Firebird 服务器版本为 2.5.3.26778 32 位
Delphi版本为XE7
补充编辑:数据库文件的 ODS 为 11.2 (Firebird 2.5/InterBase 7.5)
知道我做错了什么吗?
尽管 InterBase 和 Firebird 有共同的传统并共享很多术语,但它们并不相同。从 Firebird 1.5 开始,ODS 版本控制出现了分歧。尽管 Firebird 1.5 和 InterBase 6.1 都有 ODS 10.1,但这些 ODS 版本不同且不兼容,对于 Firebird 2.5 和 InterBase 7.5(它们都有 ODS 版本 11.2)更是如此。
因此,如果您尝试使用 Firebird 2.5 打开 InterBase 7.5 数据库它将无法工作并且 Firebird 将报告数据库无效(反之亦然,InterBase 将报告类似如果您尝试打开 Firebird 数据库会出错)。
在技术层面上,这是通过屏蔽 ODS 版本在 Firebird 中实现的,因此它们与 InterBase 的版本不同:
Hds_ods_version
: Two bytes, unsigned. Bytes 0x12 and 0x13 on the page. The ODS major version for the database. The format of this word is the ODS major version ANDed with the Firebird flag of 0x8000. In the example below, the value is 0x800b for ODS version 11. The minor ODS version is held elsewhere in the header page - seehdr_ods_minor
below.
发件人:Inside a Firebird Database → Database Header Page - Type 0x01