Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
On error= no line.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00813170
Message ID:
00813248
Vues:
4
>>>The ERROR is
>>>"1 File 'lockrec.prg' does not exist. 136 SHIPPING_MAIN.DESTROY"
>>>
>>>Exercpt of the code..................
>>
>>>  else
>>>        repo form ship2 to prin
>>>     endi
>>>      NEXT                    &&TYPE P:&FF TO PRIN
>>>    ENDI
>>>
>>>     SET CONS ON
>>>     SET PRIN TO
>>>     SET PRIN OFF
>>>                       LINE 136 is HERE!
>>>MACT = 'SHIPSRC0-2001'
>>>USE &LD:JONTRANS
>>>APPE BLAN
>>>DO LOCKREC
>>>IF OKTOSAVE
>>> REPL ACTION WITH Mcall
>>> REPL WHO WITH NAME
>>> REPL THEDATE WITH DATE()
>>
>>
>>Well, the error message is quite clear - the LockRec.prg is not found. Are you sure, you have this program in the project? Are you testing form alone? Is this prg in the set("path")?
>>
>>I think, you miscalculated the line or somehow the line returned shows incorrectly. It is obvious, that DO LOCKREC produces an error. Also the USE &LD:JONTRANS looks strange. What is the name of the table you want to use? I think, there is a typo in that line. Colon is not allowed in the table name.
>>
>>Finally, I think, it would be better to create a new method in the form called SaveChanges and use this method instead of Destroy...
>
>The code has been working for long time, now this crazy error. happens only occasionally. When would method "SaveChanges" be executed and how? I ususally stick to standard methods.

If the form can be closed by using little close button in the upper right corner of the form, then you can call this method from QueryUnload, e.g. put one line of code in QueryUnload return thisform.SaveChanges() Otherwise just call this method from your close button.

How about USE line? Are you sure, you not accidentally introduced a typo? Also where is LockRec? Is it function or separate prg? Could it be, that it's missing? Could you recompile the whole project and see, if problem persists?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform