bxm Posted June 21, 2006 Posted June 21, 2006 I am writing a script to take transaction information from a transaction file, format it, and send it to a holding file (where the info waits to be transferred to a mainframe via PHP). The format of the transaction file is: Headre info Detail Line Info Trailer Info So one transaction record = three records in the holding file. I would like to lock the holding file while the three records for the transaction file are being created to avoid the possibility that two transactions are added at the same time, causing the Header / Detail / trailer order to get mixed up. Is there a way to lock a file at the beginning of a script so that only the current user can add records?
Lee Smith Posted June 21, 2006 Posted June 21, 2006 Tell us what your set up is. You have posted this to a general discussion topic for version 5, but reflect v7 in your profile, and asking about locking a file, which means you are probably talking about a served environment. The Forum has many Topic Areas representing the different FileMaker Features and Functions. Each topic has a short description that suggest what type of question is expected to be posted in it. When posting find an Topic with a description that come the closes to matching the sprit of your question, and avoid the General, Special, and Sponsored Topic areas, unless their diescriptions fit your question. Your question probably belongs in topic area, such as the Peer, Sever 5, etc. topics, that can be found in [color:blue]Serving, Sharing FileMaker - LAN, WAN & WEB. Once I know your set up, I'll move the question. Lee
Fitch Posted June 21, 2006 Posted June 21, 2006 Perhaps you could create a one-record table (or file in FM5) with a field for user ID. When you run the script, first check if this field is empty. If it's not, then exit your script. If it's empty, put the current user's id in it, run your script, then clear the field when done. Addressing Lee's concerns, since you're trying to script the locking of a file I'd have posted this in the Scripting forum.
bxm Posted June 21, 2006 Author Posted June 21, 2006 (edited) Lee: The setup is FM5.5, using a server. Fitch: That's a good suggestion. I'll try that. Edited June 21, 2006 by Guest
Recommended Posts
This topic is 6732 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 accountSign in
Already have an account? Sign in here.
Sign In Now