Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
QV8.50
We are fortunate to have 2 developers and 6 professionals. We are all running one QVD. On occasion, we have had clashes of author, i.e. two or more people trying to change and save a single document.
Does anyone know of a way we can alert users, in the way Excel does for example, when someone else has a file open?
Ta
Hi Russell,
I have an idea to resolve your problem. You should use (in your script) a DOS command to create a temporary file you will use as an "occupation flag". Then, you will only have to test if the file exists or not before making your modifications.
The script will be something like that:
SET TFile = QVTemp.txt; // Store there the name of your temporary file
// Set a variable indicating if the QVD exists or not
IF FileSize('$(TFile)') > 0 THEN
// What you do if already in use
ELSE
EXECUTE cmd /c echo 'In use' > QVTemp.txt;
// What you do if free
EXECUTE cmd /c del QVTemp.txt;
END IF
Best regards,
Franck SEREGAZA
Business & Decision
Thanks Franck, I love the simplicity of your idea, and I am sure it will work.
Would you know how to record the active user's ID in the qvtemp.txt file? I was thinking this could then be displayed as an alert when opening the document.
Regards
Russell
Depending on what you want, you can use 2 QV functions:
I hope it will fit you.
Best regards,
Franck SEREGAZA
Business & Decision