Path Variables (FireDAC)

From Appmethod Topics
Jump to: navigation, search

Go Up to Multi-Device Development (FireDAC)


FireDAC allows you to use substitution variables in the paths, including:

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