4D v12.4

OPEN DATA FILE

Home

 
4D v12.4
OPEN DATA FILE

 

OPEN DATA FILE 


 

OPEN DATA FILE ( accessPath ) 
Parameter Type   Description
accessPath  String in Name or complete access path of the data file to open

The OPEN DATA FILE command allows changing the data file opened by the 4D application on-the-fly.

Pass the name or the full access path of the data file to open (file with a ".4DD" suffix) in the accessPath parameter. If you pass only the file name, it must be placed next to the structure file of the database.

If the access path sets a valid data file, 4D quits the database in progress and re-opens it with the specified data file. The On Exit Database Method and the On Startup Database Method are successively called.

Warning: Since this command causes the application to quit before re-opening with the specified data file, it is not possible to use it in the On Startup Database Method or in a method called by this database method.

The command is executed in an asynchronous manner: after its call, 4D continues executing the rest of the method. Then, the application behaves as if the Quit command was selected in the File menu: open dialog boxes are cancelled, any open processes have 10 seconds to finish before being terminated, etc.

Before launching the operation, the command checks the validity of the specified data file. Also, if the file was already open, the command verifies that it corresponds to the current structure.

If you pass an empty string in accessPath, the command will re-open the database without changing the data file.

4D Server: This command cannot be used with 4D Client or 4D Server.

 
PROPERTIES 

Product: 4D
Theme: 4D Environment
Number: 312

Not for server

 
HISTORY 

Created: 4D v6.8

 
SEE ALSO 

CREATE DATA FILE