KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: The On Exit database method from 4D Client cannot access records?
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: August 18, 2006

The On Exit database method cannot access records when executed on 4D Client. This is because the On Exit database method runs in a *local* process. As stated in the 4D documentation, a local process cannot access the data with 4D Client.

To access data under the context of exiting 4D Client do the following:

1. Create a global process from the exit code to perform the necessary data access.
2. Pause the exit code until the global process completes.

For example:

<>P_Done:=False

$a:=New process("MyOnExitMethod";256000;"MyOnExitMethod process";*)

Repeat

      DELAY PROCESS(Current process;10)

Until (<>P_Done)

Where "MyOnExitMethod" will perform the data access as needed.