Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding, if file is used exclusively
Message
 
 
À
04/10/2000 22:56:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00425134
Message ID:
00425143
Vues:
26
>I've been using the following for years (since the DOS days...)
>
>PARAMETERS filename
>fh = FOPEN(filename, 12)
>IF fh > 0
> =FCLOSE(fh)
> RETURN (ok to use exclusively...)
>ELSE
> RETURN (file is in use, try again later...)
>ENDIF
>
Rick & Barbara,

Thanks for your answers. Let me give your a little bit history of the problem:

I have this line of code:
USE (lcTableName) ALIAS (lcAlias) AGAIN NOUPDATE SHARED IN 0

It gave me an error: 'file access is denied'...

Therefore I have to find, if file is already in use, and if it's, is it exclusive access or non-exclusive. If file is used exclusevely, does it mean, that it could not be opened even in shared mode on another computer?
If it's true, each use function should be surrounded with quite long piece of code...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform