Davide,
Your techinque for multi-user access has worked well for us for over 14 years. Yes 14 years! We do not lock parts of files or records, we just lock the entire file for a very brief moment while we update/add the record, that way any process will only have to wait only a few moments (hardly noticable) to most users on a database app.
For actual record locking, for example if you are doing a billing run and want to prevent other users accessing a range of records while you batch process them, simply set a single byte flag at the beginning of the record which indicates the record is in use. No need for any record locking, simply filelocking. Remember KISS....
p.s. I'm know there's a more elegant solution, however this works
-------------
Nigel Thomas
Your techinque for multi-user access has worked well for us for over 14 years. Yes 14 years! We do not lock parts of files or records, we just lock the entire file for a very brief moment while we update/add the record, that way any process will only have to wait only a few moments (hardly noticable) to most users on a database app.
For actual record locking, for example if you are doing a billing run and want to prevent other users accessing a range of records while you batch process them, simply set a single byte flag at the beginning of the record which indicates the record is in use. No need for any record locking, simply filelocking. Remember KISS....
p.s. I'm know there's a more elegant solution, however this works
-------------
Nigel Thomas
Comment