How to create Database Aliases

How can I set an alias for my database path, like in the BDE, so that distributed applications can look in different directories on different machines?

Alias support for DatabaseName is already available. The dropdown combo for the DatabaseName property will display alias names that are available. The first one, 'Default Directory', just assigns the same directory that the executable is in at runtime. This allows easy linkage of databases that are stored in the same directory as the executable. The file 'halcyon.cfg' can be created and used to add more alias names that may be selected. This file must be in the Windows directory, normally c:\windows. It is actually an 'ini' file that is read using routines in the Inifiles unit. Example:

[Alias]
DBDEMOS=C:\DELPHI16\DEMOS\DATA
QUIKQUOT=c:\qqdb

This may be used to add alias names and their related file paths. The file path can be different for the same alias on each machine running the program.

The halcyon.cfg directory can be changed in the LoadConfiguration procedure in Halcn6DB. This is the last procedure in the unit, just above the initialization section.

Note the aliases cannot be seen in the designer until the next time Delphi is started, after a change is made.