如何以及在何处将数据库驱动程序安装到 IDE 中?第二部分

发布于 2024-10-28 02:01:05 字数 1330 浏览 1 评论 0原文

此查询的背景是 这个问题

我已经为 Firebird 安装了此驱动程序,并将其放置在IDE。 XE Data Explorer 可识别驱动程序,并且可以使用 Data Explorer 创建连接。尝试通过此连接查看表或任何其他数据库元素会导致此问题中描述的错误。据我所知@Alejandro Jourdan尚未获得此问题的解决方案,我也找不到解决方案在 Firebird 或 Delphi XE 的任何支持站点上。

当我使用此连接创建 TSQLConnection 时,出现第二个问题。连接的工作范围是它生成数据库的登录提示,但是当它尝试打开连接时,我收到错误消息:“文件不是有效的数据库”此错误消息(某种程度上)可以从数据资源管理器出现以下错误:

文件 [数据库路径] 的“CreateFile(open)”操作期间出现 I/O 错误 尝试打开文件时出错。访问被拒绝。

数据库有效,可以从 Firebird 命令行实用程序和数据库浏览器打开。

环境:

Machine: Lenovo Thinkpad W510
OS: Windows 7 Ultimate 64bit
Delphi: Embarcadero® RAD Studio XE Professional Version 15.0.3953.35171
Database: W1-V2.5.0.26074 Firebird 2.5 (64 bit)

还安装了:

Embarcado Borland® Developer Studio 2006 Enterprise Version 10.0.2288.42451 Update 2 (XP Version)
Borland Delphi Version 7 (XP Version)

编辑:

请参阅下面我自己的答案。此编辑删除了根据该答案证明是不必要的大量细节,同时保留了问题的核心及其中包含的链接。

The background to this query was this question.

I have installed this driver for Firebird and placed it within the path (system32) used by the IDE. The XE Data Explorer recognises the driver, and it is possible to create a connection using the Data Explorer. Trying to view tables or any other database element through this connection results in the error described in this question. As far as I can see @Alejandro Jourdan has not obtained a solution to this problem, and I can find no solution on any of the support sites for Firebird or for Delphi XE.

The second problem comes when I create a TSQLConnection using this connection. The connection works to the extent that it generates the login prompt to the database, but when it tries to open the connection I get the error message: 'file is not a valid database' This error message is (sort of) reproducible from within the Data Explorer which gives the following error:

I/O error during "CreateFile(open)" operation for file [database path] Error while trying to open file. Access is denied..

The database is valid and can be opened from the Firebird command line utility, and from a Data Base browser.

Environment:

Machine: Lenovo Thinkpad W510
OS: Windows 7 Ultimate 64bit
Delphi: Embarcadero® RAD Studio XE Professional Version 15.0.3953.35171
Database: W1-V2.5.0.26074 Firebird 2.5 (64 bit)

Also Installed:

Embarcado Borland® Developer Studio 2006 Enterprise Version 10.0.2288.42451 Update 2 (XP Version)
Borland Delphi Version 7 (XP Version)

EDIT:

See my own answer below. This edit has removed extensive detail that proves to be unnecessary in the light of that answer, while retaining the core of the question, and the links contained within it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一杆小烟枪 2024-11-04 02:01:05

让我印象深刻的第一件事是您使用的是 64 位版本的 Firebird,并且您提到它同时带有 32 位和 64 位驱动程序。 DLL 的名称是否相同?如果是这样,我怀疑 IDE/OS 正在尝试在 32 位应用程序中加载 64 位版本的 DLL,这是不可能的(32 位应用程序无法加载 64 位驱动程序,反之亦然)反之亦然)。

请尝试以下两种方法之一:

  • 首先,如果 DLL 具有相同的名称,请暂时重命名 64 位版本,然后重新启动 IDE。然后再试一次。

  • 尝试安装 32 位版本的 Firebird,即使您运行的是 64 位操作系统。

The first thing that sticks out to me is that you're using the 64-bit version of Firebird, and that you mentioned it comes with both a 32- and 64-bit driver. Are the DLLs named the same? If so, I suspect that the IDE/OS are trying to load the 64-bit version of the DLL in a 32-bit application, which isn't possible (32-bit apps can't load 64-bit drivers, and vice versa).

Try one of two things:

  • First, if the DLLs have the same name, rename the 64-bit version temporarily, and restart the IDE. Then try again.

  • Try installing the 32-bit version of Firebird, even though you're running a 64-bit OS.

薄暮涼年 2024-11-04 02:01:05

我的基本问题(第一部分)是:

我想安装 Firebird 数据库
驱动程序,并使其可用
在 Delphi XE IDE 中。我想要
数据库驱动程序可在
与其他提供的数据库相同的基础
驱动程序(例如 Interbase、SQL - 来自
在 IDE 的数据浏览器中)。
我已经找到合适的驱动程序。

经过大量调查后,我发现不可能实现我想要实现的与 Delphi IDE 的集成。这是因为数据资源管理器是一个 .NET 应用程序以及可用的 DBExpress 驱动程序(此处 和 < a href="http://www.devart.com/dbx/" rel="nofollow">此处)与 .NET 不兼容。我知道我可以通过在 IDE 中适当设置参数以及在我正在开发的应用程序中进行编程来使用驱动程序。

我起草这个答案是为了帮助其他人避免这个特殊的死胡同。我还在编辑第二部分的问题,以删除很多细节,根据这个答案,这被证明是不必要的。

The basic question I had (in part I) was:

I want to install a Firebird database
driver, and to have it available
within the Delphi XE IDE. I want the
database driver to be usable on the
same basis as other, supplied database
drivers (eg Interbase, SQL - from
within the Data Explorer in the IDE).
I have obtained an appropriate driver.

After considerable investigation I have found that it is not possible to achieve the integration into the Delphi IDE that I was trying to achieve. This is because the Data Explorer is a .NET application and the available DBExpress drivers (here and here) are just not compatible with .NET. I understand that I can use the drivers by setting up the parameters appropriately, in both the IDE and by programming in the application I am developing.

I have drafted this answer to assist others to avoid this particular blind alley. I am also editing the part II question in order to remove a lot of the detail, that proves to be unnecessary in the light of this answer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文