Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error that brings down VFP 5.0
Message
From
17/03/1997 13:17:47
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00024532
Message ID:
00024545
Views:
30
>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.
Try something like



store 1 to mResponse
DO WHILE NOT FILE(gcPassName)
mResponse =Messagebox("File not found....",1)
ENDDO

IF mResponse=1
.... your code
ENDIF
L.A.Long
ProgRes
lalong1@charter.net
Previous
Reply
Map
View

Click here to load this message in the networking platform