In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

QTIPS - Deleting Master Relationally Indexed Records

(Tested on 1.16). There may be times when it is considered desirable to delete a record that contains relational keys linking it to other table(s). If a DELETE file rec_id command is issued, the record is deleted, but at the next "Updating Indexes" the system restores the record blank but for the related keys. In some ways this is desirable as it enforces a form of referential integrity but it can make things difficult.

Jim Owens was provided with a routine by Sprezzatura to do this but using the basic principles provided, refined the routine into that found below.


0001            OPEN DATAFILE TO TARGET THEN
0002                 DELETE TARGET,REC_TO_DELETE
0003                 X = ""
0004                 WRITE X ON TARGET,REC_TO_DELETE
0005                 DELETE TARGET,REC_TO_DELETE
0006            END

As Jim says "I'm not sure WHY it works!... but it works". What is probably happening is that the transaction record sequence is in some way being fooled by the rapid sequence of events. As this is the case there is a strong possibility that this will be rectified in a future release of the software, so if you use this tip, check it with every AREV upgrade.

(Volume 2, Issue 6, Page 5)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel