×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Is there a way to 'lock' a record so that nothing can even read it until
I release it?
We have a control record for next-available-group-number. We read the
record to get the next number, and then increment the number and update
the control record. This works fine until we hit the situation where
two jobs read the control record virtually simultaneously, and the
faster job burns through the next 6 available numbers before the slower
job does its first update, even though this happens in a tiny fraction
of a second. It's literally a million-to-one chance, but it just
happened last week.
Once a job reads the control record, I need to prevent any further
access of the record (including reads) until the first job releases it.
I've thought about trying to use a single SQL update statement but there
are two problems with that:
1. The 'number' is in an alpha field that I have to substring to get,
and to update.
2. The 'number' is 5 digits and will have to eventually wrap around
from 99999 back to 1.
I can't lock the file.
We're on 7.2.
Any thoughts?
Thanks.
~TA~
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.