Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Safety On
Message
De
29/03/2006 18:15:08
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
29/03/2006 07:17:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01108731
Message ID:
01109017
Vues:
18
>I am exporting data to a csv file using STRTOFILE. I set safety on before i issue the command and it prompts me to overwrite if the file already exists.
>
>How do i trap the reply (ie. 'yes' to overwrite, or 'no' not to)?
>
>SET SAFETY ON
>STRTOFILE("Detail Report" + CHR(13), ALLTRIM(txtSaveAs), .F.)

Instead of Safety On, you can use the PutFile() function to get the filename (if the file isn't already defined, that is). It will ask for confirmation and return an empty string if the user chose NO.

If you don't let the user choose the filename, then go with Borislav's solution.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform