Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4523 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi All,

In a FM Server hosted database with multiple files, is it necessary to close each file as the user exits? I see the need to do this in a single user environment, but when the files are hosted on server they are always open until closed by the server. The reason i ask is that while debuging my quit script one of the data files(Separation Model) threw an error 13 (file in use) since that data file was opened on the client by reference. Any one know the best practice is relative to the "Close File" script step??

Thanks in advance,

Tim

Posted

Tim,

What does the script do that you were debugging? Not sure I understand why this is an issue.

Please explain.

Posted

Hi Agnes,

It is a system shut down script. The logic is that on the response from the user this script (which is in the interface file) sends a close file command for each of the 6 datafiles which may or may not be actively open on this users client. After each datafile is addressed it goes to the splash layout and Exit Application. Two scripts work to trap users who click on the Red X at the top of the application window to close the database. Attached are the scripts.

Thanks,

Tim

CloseScript.pdf

ForceCloseScript.pdf

Posted

IMHO the whole point of using FMS is that there is never a need to close the files: not for backup, not for anything apart from scheduled downtime. FMS offers 100% availability of service.

Why do the files on FMS need to be closed?

Scripts that trigger on close are not 100% reliable because they don't get run if the FMP application is quit. (Custom menus won't help because the FMP application might be quit from another file.)

Posted

Thanks, Vaughn

My situation is a Separation model with one interface file. Under that model, I can trap for the quiting of the application since all layouts, for the user, are in the interface file. As for WHY, it seemed like a good idea in version 5 and just got copied over version after version. Error code 13 doesn't halt/pause execution( silent failure) so I did not notice.

With the move to version 12, many things are being refined and questioned, for the possibility of a better way.

Tim

Posted

I can trap for the quiting of the application...

Actually you cannot. Application quit is the fire alarm going off in the building and everybody leaves immediately, no time to clean up desks or get handbags.

There is no need to close open files.

Posted

I hate to extend this point, but I cannot see how the attached file could be closed without my script firing and giving the use a chance to change their mind and stay in the file. Could someone please expose the hole in my logic without modification to the file, remembering that users do / will not have layout, script or design database access? please see the sample file attached.

QuckReference12.zip

Posted

Tim, you're right, it works!

I've pretty sure that in previous versions, quitting the app did not run the file close script... but my testing indicates otherwise. Hmmm... bit of a worry (for me). :)

Posted

I've used a file close script in both FM9 and FM10 to prevent over-zealous window closing by users from dumping them out of the solution. This is especially useful for Windows users who love to click the red X in windows. A Halt Script step will prevent the app from closing if the user tries to close the last window.

This topic is 4523 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.