Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for the ability to use a file exclusive
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00318595
Message ID:
00318767
Vues:
21
Paul,
I ended up with a routine very similar to this. Fortunately the concept works in 2.6 as well as VFP...

...hmmm, should that then be seen as a flaw in VFP?

Just a thought....


Thanks,
Rick

-------------------
>Richard:
>
>I use a modified version of the following program:
>
>LOCAL oTableUtility
>oTableUtility = CREATEOBJECT("TableUtility")
>
>IF oTableUtility.OpenTableExclusive("person")
> = MESSAGEBOX("File open exclusive!")
>ELSE
> = MESSAGEBOX("File NOT open exclusive!")
>ENDIF
>
>DEFINE CLASS TableUtility AS CUSTOM
>
> PROCEDURE OpenTableExclusive
> LPARAMETERS tcTable
> SELECT 0
> USE (tcTable) EXCLUSIVE
> IF NOT USED(tcTable)
> RETURN .F.
> ELSE
> RETURN .T.
> ENDIF
> ENDPROC
>
> PROCEDURE ERROR
> LPARAMETERS nError, cMethod, nLine
> IF nError = 1705
> * Do nothing
> ENDIF
> ENDPROC
>
>ENDDEFINE
>
>HTH,
>
>--Paul
>
>>I hope someone can help me.
>>I need to initially open a file exclusive, to issue a pack.
>>I want the first user in each day to do this. I have a routine which handles the first user in stuff...but my problem is that some users forget to get out.
>>
>>How can I test to see if a file can be had exclusive....without producing an error if I can't get the file exclusive?
>>
>>Rick
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform