Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to see if file can be used exclusive w/o causing err
Message
De
15/08/2000 19:49:07
 
 
À
15/08/2000 12:20:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00405024
Message ID:
00405299
Vues:
17
>Use FLOCK(). If it returns .f., then the file cannot be locked.
>

An FLOCK() does not guarentee that you can use the file EXCLUSIE:

SET EXCLUSIVE OFF
USE MyTable SHARED
USE MyTable SHARED AGAIN IN 0 ALIAS AnotherAlias
? FLOCK()
USE MyTable EXCLUSIVE

>use myfile
>if flock()
> use myfile excl
>else
> && whatever error coding you want
>endif
>
>
>>Hi,
>>
>>I need to test a file to see if it can be opened exclusively but, if not, I don't want the error handler to kick in. I'll test to see if the file is opened after the attempt.
>>
>>Any ideas?
>>
>>TIA
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform