4D v13.4

OPEN DATA FILE

Home

 
4D v13.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. In single-user mode, 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: Beginning with 4D v13, this command can be executed with 4D Server. In this context, it makes an internal call to QUIT 4D on the server (which causes a dialog box to appear on each remote machine indicating that the server is in the process of quitting) before opening the designated file.

 
PROPERTIES 

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

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Created: 4D v6.8
Modified: 4D v13

 
SEE ALSO 

CREATE DATA FILE