Cannot resolve unit name 'DBTables' at line 20 (BDE)

落花浮王杯 提交于 2019-12-11 07:02:54

问题


I'm facing up a problem to run my program. My code is so old that I'm not sure how it works.

Cannot resolve unit name 'DBTables' at line 20
Underclared indetifier 'EDBEnginerError'
Underclared identifier 'Error'

I think it is missing BDE, but how do I Import it to my project?

Things that I already tried: - Migrate BDE to FireDac with no success. These classes were not replaced.


回答1:


BDE is deprecated. Recent versions of Delphi do not install BDE support files by default. See:

BDE Installer for RAD Studio, Delphi, C++Builder 10.2 Tokyo

BDE components in RAD Studio/Delphi/C++ Builder

Installing the BDE, should allow the compiler to find DBTables.Pas. That should fix the undeclared identifier errors.

That should get you going, but if you are needing to do any development work, you should really consider replacing the BDE.

Initially Delphi's DB support, in 1995, was based on the BDE, which was Borland's attempt to do similar to MS's ODBC. As a result, many later DB libraries, like FireDAC include TxQuery and TxTable components that work similarly to TTable and TQuery, so upgrading a straightforward BDE-based app to a more modern DB-access library needn't be too painful, unless the BDE app made extensive use of direct calls to the BDE query engine - those calls usually are prefixed dbi. If your code has lots of those, you are in for an interesting time upgrading.




回答2:


Even though the BDE has been deprecated for years, that does not mean that it no longer works. Even the latest version Delphi 10.2 ships with the units Bde.DBTables: http://docwiki.embarcadero.com/Libraries/Tokyo/en/Bde.DBTables It may not be part of the trial version though.

In addition you will need the BDE itself which no longer ships with Delphi but can still be downloaded from Embarcadero. (Actually I am not sure, it might even still be an optional part in the Delphi Installer.)



来源:https://stackoverflow.com/questions/44314923/cannot-resolve-unit-name-dbtables-at-line-20-bde

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