Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File in Use Question
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00135468
Message ID:
00135470
Views:
16
>Using vfp6.0
>
>I have a program that creates a .dbf file (fox2 format) to be used by MS Word for mail merge. Everytime a user creates labels, it also issues a 'copy to myMrgFile type fox2'. My .exe file never opens the file. But --- heres a scenerio I am expecting:
>
>1) User has my .exe and MS Word open.
>2) User is in the middle of a mail merge and notices names are missing.
>3) User switches to my vfp .exe and pulls another query.
>4) Vfp .exe file attempts to 'copy to myMrgFile type fox2' but since Word has it open - it fails.
>
>I am dealing with very elderly people, most of which do not know how to use mail merges. I don't want to use a putfile().
>
>Question:
>How can I find out if myMrgFile.dbf is open by another program (not necessarily Word)?
>
>Robert

If you put error trap on USE ... EXCL command, you will catch that file is in use.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform