Delphi - KA Dao

Installing and using KA Dao, a freeware component that provides access to MS Access without using the BDE.

The available help is pretty good, but it is not integrated into the Delphi help. Just open KADAO.HLP. Basic instructions are described via

Installation | License Issue | cgi Issue


KA Dao is available from,, and - just download and un-zip the package. In general, the installation instructions (Readme.txt) are pretty good (and pretty simple) There are a few things that must be done different depending on the Delphi version. (For instance, Delphi 6 uses a different *.dpk file than Delphi 3-5).

On my systems, installing KADao.dpk compiles the source files, creates *.dcu files in the same directory as KADao.dpk, and places the components on the KA Dao tab of the Component Palette. This allows me to design a form and use the components to display data. However, when I compile the application ...

This is fixed by adding the directory to

License Issue

On some systems, there is a "license issue" Apparently this is just an annoyance, the program will run anyway (tested under Windows 2000 Pro). If you just double click the *.exe (instead of running the application from the Delphi IDE), then the license error is not shown.

This error can be turned off by adding EOleSysError (just select Add... and paste the string) to

Basically, KADao checks for one of 2 valid MS Access database drivers. If the first option is not found, then it checks the second. On the failing system, there are 2 registry entries

The first one does not have a valid license, but the second one does. The systems that don't have problems have only one registry entry.

cgi Issue

When I use KA Dao in an application, the database (*.mdb file) can be located anywhere. But when I use the components in a cgi file, the database MUST be on the same computer as the *.exe file.

This code

indicates that the default value of Database was replaced with

This occurs because KDaoDataBase.pas checks the existence of the file via FileExists (in Sysutils) which eventually calls the Windows SDK function FindFirstFile ... apparently it gives an incorrect response when IIS has control. (Perhaps it is part of the "sandbox" ... but it is probably a design problem.)

Testing indicates that FileExists in a cgi file works for any file on the local machine, but not for files on another machine (it does not matter if they are mapped via a drive letter or accessed directly). It also does not work with a USB drive on the same machine (tested with Windows 2000 and Windows XP).

Author: Robert Clemenzi -
URL: http:// / user / clemenzi / technical / Databases / Delphi / KADao.html