Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp 5.0 file open problem
Message
De
30/07/1998 09:46:03
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
 
 
À
30/07/1998 05:18:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00122621
Message ID:
00122657
Vues:
16
1)Why do you need to delete a shared file?
2)Is it re-created and used later in the program?
3)What code and error trapping are you using to open and delete the file? Because you cannot delete a file if you are using it. My guess is that your statements are something like...

*OPEN FILE
USE filename EXCL
*CLOSE FILE
USE
*DELETE FILE
ERASE (filename+'.dbf')

If this is the case, then the problem is a matter of timing. Even on fast computers, the chances are more than good that another computer will open the file while your computer is going from the "USE" to close the file and the "ERASE" statements.

How you go about deleting it would depend on how the file is used in the rest of the program.

>Hi,
>
> I had three vfp5.0 application running currently on the same system, sharing some same file.
>
> One of the program when running individual, is able to test a dbf file for exclusive use, it ok, then delete it. It run ok when standalone.
>
>However, when I start the another program,the above 1 program also run without any problem. follow by another program which I run. Also without any problem
>
>But when I exit all the three program and the run all at the same time, the program keep stating that the dbf is open by other program, and cannot delete the dbf file.
>
>I had check it is the same own program that are opening the file using a external utilties to show me which application is opening and closing which file.
>
>So I am at a lost of what to do as the problem is inconsistent. I had add in debug code to ensure that the same own program properly close the dbf file. Any help or suggestion is very much appreciated.
L.A.Long
ProgRes
lalong1@charter.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform