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
16/08/2000 13:55:59
 
 
À
16/08/2000 09:58:45
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00405024
Message ID:
00405664
Vues:
15
>Hi Larry,
>I don't think all this ON ERROR Failed=.T.--Reset the Error Handler is the way to go. I would do this:
>
>oUse = NEWOBJECT("UseTable", "Data.VCX")
>WITH oUse
>   .Alias = "Employee"
>   .UseClause = 'EXCLUSIVE'
>   RetVal = .Open()
>ENDWITH
>RETURN m.RetVal
>
>You know if the Open returns False, the file was not opened. You can
>then get oUse.ErrorMessage to display the reason, if it's important.
>
>This class has it's own error method to let us know about a failed USE. It knows how to determine the path. One reaon for OOP is we code once, really well, and re-use the functionality. Everytime I use a table, I can control the situation without too much thought. I need that!

So if Open() fails, it won't trigger the error handler?

Hmmm
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform