× 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.


  • Subject: Re: Locking multiple records
  • From: "Joe Teff" <jteff19@xxxxxxx>
  • Date: Fri, 30 Apr 1999 14:03:45 -0500

>In my application, similar things happen.
>We have 2 fields for this action : Used-in-Flag and Used-By-User-ID fields.
>Whenever, someone is accessing a particular record, these fields are
populated
>with 'Y' and userID and the record is updated rightaway.
>Now when someone else tries to access the same record, the program reads
the
>values of these fileds and if they are 'Y' and 'UserID' then it issues a
message
>saying '..... is used by user(&1).....'.
>And when you are done with the record you are accessing, clear these 2
fields
>and issue an update.
>It works for us.

This concept is easily trounced as soon as you get one application that does
not play by your rules. This includes DFU, DBU, Access, Client/Server, etc.
By using Commitment Control to do the locking, every possible user of your
database is forced to play by the rules. You don't need extra fields,
updates,
logic checks, etc to make it work. Commitment Control does it for you. The
Lock Level allows you to lock a record until either the commit or rollback
is
issued simply by reading the record. If your program fails, the database
is synchronyzed and the locks released. In your method, someone would
have to go in and clear those fields.

Joe Teff


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.