This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||
|
4D v19
DATABASE_PATH
|
DATABASE_PATH() |
||
The DATABASE_PATH function returns the complete pathname of the current database. The current database can be modified using the USE DATABASE command. By default, the current database is the main 4D database.
The pathname returned is in the POSIX format.
Let us suppose that the current external database is named TestBase.4DB and is located in the "C:\MyDatabases" folder. After execution of the following code:
C_TEXT($vCrtDatabasePath)
Begin SQL
SELECT DATABASE_PATH()
FROM _USER_SCHEMAS
LIMIT 1
INTO :$vCrtDatabasePath;
End SQL
... the $vCrtDatabasePath variable will contain "C:/MyDatabases/TestBase.4DB”.
Product: 4D
Theme: Functions
4D SQL Reference ( 4D v19)