How, and where to install a database driver into an IDE?

≯℡__Kan透↙ 提交于 2019-12-31 03:11:09

问题


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.

The driver consists of a Delphi project, which compiles to a DLL; and modifications to two .ini configuration files (dbxconnections.ini and dbxdrivers.ini). I assume that the DLL is the actual driver, and I have compiled the project without problem.

I have got this far, and this is where I realised that I do not know what is involved in installing a new database driver; what is involved in installing a new database driver into an IDE; nor where the elements of the installation need to reside.

So my question is: What steps are needed to install a dbExpress database driver into the Borland XE Delphi Professional IDE?

Some of the specific points I don't know about include -

  1. Does the driver need to be registered with all of Firebase, Delphi and Windows?
  2. Do I need to employ a specific registration procedure to accomplish registration?
  3. Are there any elements I am missing to accomplish my aim?
  4. Where should the installed components be located?

All four vendors, Embarcadero, Borland, UniOpen, and Firebird provide documentation (most of which is very comprehensive) but I have been unable to extract from them what I need to do and where to do it.

I have searched multiple questions on SO, but all of seem to start from the basis that the OP knows what is involved in driver installation.

All the products (except the driver project) generate multiple files in multiple locations, and it is not clear what components belong where. For example, I have multiple versions of the two configuration files residing in:

  1. C:\Users\User\AppData....
  2. C:\Users\Public\Public Documents...
  3. C:\Program Files\Vendor....
  4. ....

In addition these products install files into:

  1. the registry (multiple keys);
  2. C:\Program Files....;
  3. C:\Program Files (x86)....;
  4. C:\Windows\System....;
  5. C:\Windows\System 32.....
  6. and probably more.

Environment:

  • Machine: Lenovo Thinkpad W510
  • OS: Windows 7 Ultimate
  • Delphi: Embarcadero® RAD Studio XE Version 15.0.3953.35171
  • Database: W1-V2.5.0.26074 Firebird 2.5
  • Database Driver: UniOpen Native DBX Driver

Also Installed:

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

In summary:

What steps and locations are needed to install a dbExpress database driver into the Borland XE Delphi Professional IDE?


回答1:


You missed a file. :)

DataExplorer, from the best I can tell, uses dbxdrivers.ini. My installation of XE has a single copy of that particular file, located (Win7 64) in C:\Users\Public\Documents\RAD Studio\8.0. The connection types listed in DataExplorer come from the list of installed drivers at the beginning of that file, and each driver has one or more configuration sections which follow that list.

The driver files listed in the configuration section have to exist in a location findable (like any other Windows DLL) by LoadLibrary. The documentation in the link explains the way the API function searches for DLLs; basically though, the IDE has to find it somewhere on the PATH.

The vendor or author of your particular driver should be able to provide the info that needs to go in the dbxdrivers.ini file. (I'm not familiar with UniOpen personally, and don't have FireBird on this particular machine.) The IDE only reads that file during startup, so you'll need to (re)start the IDE after making the additions.

This post at the Embarcadero Delphi Database->DBExpress forum may help with defining aliases for your Firebird databases, and describes connecting via the TSQLConnection component. (Look for a post by Ralph Horbury-Smith.) If you don't have a Developer's Network ID, you'll need to register with the Embarcadero site; the link I provided uses HTTPS for some reason. You can also get to their forums via NNTP; I'm not using a newsreader, so I'm not sure what the address would be. There's a link to connection info on this page at Embarcadero.

There's also some information available on the Delphi XE documentation Wiki pages that might help as well.

EDIT: Found one more link at the DBExpress forums that might interest you. It has a link for another FB DBExpress driver and specific information for the dbxdrivers.ini file for that driver. It's the post by Phillip Flores (about the 3rd one down on the page).




回答2:


I am accepting @Ken's answer. His response provided links to various resources. I am summarising the answers to the specific points I had that I have obtained from the references.

  1. There is no need to amend dbxconnections.ini - the IDE will do that for me.
  2. I need to amend dbxdrivers.ini appropriately and place it in the IDE directories.
  3. The actual driver needs to be somewhere on the path - typically System32.
  4. There is no need to register the driver with Windows.
  5. Apart from the items listed above, there is no special procedure needed to register such drivers.
  6. The list here appears complete.

EDIT:

My conclusions in this summary were premature and I have asked a further question to try and obtain further information. The strikeout in the list above marks the incorrect elements.



来源:https://stackoverflow.com/questions/5452983/how-and-where-to-install-a-database-driver-into-an-ide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!