J
Jon A
I want to address a situation where a person might close
down the application improperly and that might result in the
database being corrupted.
I though I would put a field in a table I am using for
Preferences. That field would be something like ShutDownOK.
When the application starts one of the first things it would
do is read the value in that field.
If the value = TRUE, then that means the application was hut
down correctly the last time. Then the applkication would
set this field = FALSE and continue processing.
Then among the last things to do when shutting down would be
to change the value in this field to make it = TRUE.
This way, if the application is shut down improperly, the
app can determine that the next time it starts and can at
least give an alert and maybe do other things.
(1) Is this the right way to do this?
(2) If so, then how do I hook into the Application Close or
the Application Shutdown event? Where do I put the code?
down the application improperly and that might result in the
database being corrupted.
I though I would put a field in a table I am using for
Preferences. That field would be something like ShutDownOK.
When the application starts one of the first things it would
do is read the value in that field.
If the value = TRUE, then that means the application was hut
down correctly the last time. Then the applkication would
set this field = FALSE and continue processing.
Then among the last things to do when shutting down would be
to change the value in this field to make it = TRUE.
This way, if the application is shut down improperly, the
app can determine that the next time it starts and can at
least give an alert and maybe do other things.
(1) Is this the right way to do this?
(2) If so, then how do I hook into the Application Close or
the Application Shutdown event? Where do I put the code?