Re: Using a Database
- Posted by Robert Elia <bobelia200 at netzero.net> Oct 14, 2003
- 524 views
--=======76DB114C======= At 07:52 PM 10/13/03 -0400, you wrote: <snip> > >Thanks for the info. Typically someone would pull up a record and then >verify the information was correct before writing it back out. Then there >might be further delays because they had to answer the phone, etc., so I >couldn't use a file lock. In the past I have built my own locking table >which worked ok and I have also used multiple indexes which I had to maintain. > >I think I will start with EDS and then change to SQL if I have to. Many >of the files I will be using are look-up files that will work okay without >being locked. >--------------------------- Just a thought... You don't necessarily need to keep the file locked while a record is being viewed/modified; just when being read or written. Keep a copy of the original in your program. When a modified record is about to be re-written, re-read it to a temporary sequence and compare it to the original (before modification) to see if it has changed. You might add fields for the ID of the person modifying the record and latest date/time. You could also write that info to a file as an audit trail. Whether this would work depends on the likelihood of an individual record being modified by more than one person at a time. You could even keep a separate database of record numbers currently being edited. By polling this and showing a flag on-screen, an operator, trying to modify a record, would know that someone else is trying to do the same. It sounds like you've been through this before. Bob --=======76DB114C======= Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-43CD1597 Content-Disposition: inline --- --=======76DB114C=======--