Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>How can I get the information what the user chose (Yes or No) when the message “The file 'filename' already exist, overwrite it?” pops up?
You should test for the file existence first, then overwrite. The SAFETY function should be ON by default. FoxPro can be used to data processing work from the command line. In such instances, overwriting the file by default could be dangerous.
IF FILE('SomeFile')
IF MESSAGEBOX("File exists. Overwrite?",36) = 6
LOCAL m.lcOldSafety
m.lcOldSafety = SET("SAFETY")
SET SAFETY OFF
*Overwrite the file.
SET SAFETY &lcOldSafety.
ENDIF
ENDIF
Précédent
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