by Silvio.Falconi » Thu Jan 20, 2022 9:56 am
The application that I am putting in place serves to make the substitutions of teachers every morning, I am changing it because we have decided to transform it into a network with user management.
Initially to use the procedure it was necessary to insert the data in all the archives (teachers, classes, classrooms, lessons etc.), to avoid entering everything from scratch because it is unnerving, I created a conversion procedure from an Excel archive that is generally used in all schools that automatically and in a short time extracts the data and puts them in the archives.
Then I proceed to convert from Excel to an import.dbf (oImport) archive
Then from this oImport archive I have to populate a series of archives (classes, classrooms, teachers, timetables, lessons, subjects, groups) through a procedure created by me, but the archives must be empty., And then the indexes must be recreated.
Probably this operation must be done by only one and not the shares, so before loading the conversion procedure I have to check if the users have logged out of the system. and only then can I call up the procedure and open the archives exclusively.
how should i check if a user is inside the system?
I have to check the user archive and the TAbations archive to see if there is a user who has entered the system
If there is someone I send a message "You must exit the system" through a procedure of messages between users of the same program and then I have to proceed and then I can use the archives in exclusive mode and use pack and zap.
Are there any other solutions?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com