Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
About exclusive use....
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00449722
Message ID:
00450091
Views:
29
>>
>>fh=fopen(filetopack,12)
>>if fh>0 and fclose(fh)
>>  ** Ok to open exclusively
>>endif
>>
>>But the error checking approach is more reliable and more generic.
>
>I don't know about "more generic" Nadya, the one reason I still use this technique is that I've used it in every language I've programmed in since mainframe days, even those without any error handlers. It's almost identical to code in any language, ultimately transportable. For that reason, I would say this method is more generic...

Ok, I must have used wrong term here. Craig pointed to a probability, that other user can open the file between fclose() and use in another thread, so let's consider this method to be 99,9% reliable, while Error Handler approach is 100% reliable. Don't think you have to worry :)
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform