Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error that brings down VFP 5.0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00024532
Message ID:
00024739
Vues:
30
Use my DriveInformation Class. You can find it in the download corner here on UT or on VFPYP (Classes-VCX category). The class has a method IsLoaded() that returns true if the drive is loaded. You can also use it to retrive a lot of other info about the drive (Free space, label, etc.) that might be useful in your case.

Vlad

>>I can consistently bring down VFP 5.0 by forgetting to put a floppy in the a: drive and have my application execute the following where gcPassName = A:\STUDENT.IMS
>>
>>gcPassName = IMSLOCATION &&Public set in Splash Form
>>gcPassFile = PUTFILE('Student logfile disk:', gcPassName, 'IMS')
>>IF EMPTY(gcPassFile) && Esc or Cancel pressed
>> CLOSE TABLES ALL
>> THISFORM.Release
>>ENDIF
>>COPY TO &gcPassFile ALL TYPE DELIMITED WITH TAB
>>MESSAGEBOX('Log file successfully created!', 0, 'IMS Logfile')
>>
>>------------------------------------------------------
>>I get a message from Windows95 that "This program has performed an illegal operation and will be shutdown". The error occurs on the second line of the above code, issuing the PUTFILE without a floppy in the drive. When I put a floppy in prior to executing this command, it works. Also, if gcPassName is set to the C or D drive, everything is OK. Any ideas how to prevent this crash? My users are bound to forget to put a floppy in occassionaly. Please respond here or to dowe@itsnet.com. Thanks.
>
>A quick fix is to issue; lnSpace = DiskSpace(cVolumeName). If lnSpace
>is -1, the drive could not be read.
>
>Steve Despres
>EZ Data Inc
>sdespres@erols.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform