I am attempting to run the following code when a button of a form is clicked:
****
USE dig-shrtv2!dsjn
* Check to see if JobNumber already exists
* If so, prompt for what to do
* Else do form originate.scx
IF ((recsize()>0) AND (seek(gnactivejobnumber)))
DO FORM AddOrUpdate.scx
ELSE DO FORM originate.scx
Endif
thisform.Release()
****
When execution gets to the IF/AND line, the code errors out with:
Error loading file - record number 9. APSPOR members>. Loading form or the data environment: Cyclic Relation
I assume this error occurs because SEEK() can only be run on primary indexed tables ( which dsjn IS !! ) and that something is awry with the relationships between dsjn and pnt_det or progress ( the other two tables). dsjn has a primary index on a field 'job_num'. This is related to a 'regular' index in both of the other tables. The indexed fields in all three tables have the same name. Only the index in dsjn is PRIMARY! The other two are REGULAR. All are indexed 'descending'. What is cyclic about this relationship?
BTW...The 'Data Environment' window shows a line connecting the indexes in 'pnt_det' and 'progress' with the job_num FIELD ( not the index!! )in the dsjn table. Hmmmmmm.. Shouldn't those lines show a connection to the 'index' in dsjn..not the field itself??
Clear as mud to me ;-) ...Can anyone educate my ignorance?
Thanks in advance ( again ) .. Glad I found you guys!
Bob
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement