KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to restart a 4D database programmatically
PRODUCT: 4D | VERSION: 11 | PLATFORM: Mac & Win
Published On: April 23, 2009
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Sometimes conditions exist were you need to have database restarted immediately. You could always put up an alert and ask the user to restart the database. However, if you want to force the issue and take the decision out of the users' hands, use the OPEN DATA FILE command. When called with the current data file as the target, OPEN DATA FILE(Data file) closes the data file, quit and restart 4D with the current data file.

Note, any code in On Exit Database Methods and On Startup Database Methods will successively be called.

Commented by Timothy Penner on May 7, 2009 at 9:07 AM
This cannot be used in a Client / Server environment; it will only work in a single-user environment.