How, and where to install a database driver into a

2019-02-28 04:37发布

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.

2条回答
我想做一个坏孩纸
2楼-- · 2019-02-28 04:53

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.

查看更多
爷的心禁止访问
3楼-- · 2019-02-28 05:04

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.

查看更多
登录 后发表回答