Mixing BDE and Apollo settings

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > FAQ >

Mixing BDE and Apollo settings

 

Yes. Database Aliases in the TApolloTable.DatabaseName property are supported for Apollo table types. However, aliases created by the BDE Configuration Utility are for use by the BDE, and are not used with TApolloTable at all.

 

Therefore, you need to either hardcode your data path into the DatabaseName property, or use a TApolloDatabase component in your project that defines your data path and alias to be used by all TTable components on the form. This is handled through combined use of TApolloDatabase's DataPath and DataPathAlias properties.

 

To allow for changing of the data path without having to rebuild the .EXE, you can use an INI file and store the data path there, using Delphi's TIniFile or TRegIni objects, or even direct WinAPI functions, to read in the path information at application startup, and assign that value to the DatabaseName property.