To keep the connection between the subfile record on the display, when there is 
a one-one relationship, I have gotten into a habit of setting up a hidden 
character field inside the subfile record, where that character field matches 
(or preferably exceeds) the length of the database record. 

That way, when I read the subfile record, however I do it, the entire database 
record is there and I use that. You can either move it into an externally 
described data structure, prefixed or not, to get the actual field values, or, 
you can use the Based() keyword to overlay it, and you can take it from there. 
Like when you display the detail on another full screen, you skip one more disk 
I/O action. 

---Alan 

  
Booth Martin <booth@xxxxxxxxxxxx> wrote:
  Subfiles need to be chained. As part of the subfile record I would 
suggest a hidden field with the PF keys, unless the keys are displayed 
on the subfile. The KLIST for the PF will need to be the fields from 
subfile. You can do a simple DOW not %eof loop to read your subfile and 
delete your PF record. Chain with an index, set to 1 before the loop, 
and increment it as you go.

Another choice, if the PF file is not keyed, is to use the RRN and save 
the RRN as a hidden field in the subfile, and chain with the RRN number 
to the PF. This is particularly handy if you are processing a file and 
do not want record locks,





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.