Path Variables (FireDAC)
Go Up to Multi-Device Development (FireDAC)
FireDAC allows you to use substitution variables in the paths, including:
- The Database connection parameter, specifying a local database connection path
- The TFDScript.SQLScriptFileName property
- The TADMoniFlatFileClientLink.FileName property
- The TFDManager.ConnectionDefFileName property
- The TFDManager.DriverDefFileName property
- The Database and BackupFiles properties of the InterBase and Firebird service components
- The Database and DestDatabase properties of the MS Access service components
A string value may contain substitution variables with the format $(name). There are several predefined variable names:
- DOC -- the documents folder path
- TEMP -- the temporary files folder path
- RUN -- the application executable path
- RAND -- the random integer number
- NEXT -- the next integer number in the specified path
Additionally, a variable can be the name of an environment variable.
All variable values are without a terminated slash. In a string value, you can use both forward and back slashes. FireDAC replaces the slashes with the appropriate value for a platform.
Example
A path to an SQLite DB on an iOS device:
$(DOC)/test.sdb
A path to a temporary DB:
$(TEMP)\data.sdb
A path for an incremental DB backup file:
/tmp/addemo$(NEXT).bck
A path for a trace file:
c:\temp\trace$(NEXT).txt