Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best approach to verify for exclusivity of a file
Message
De
08/08/2011 14:48:24
 
 
À
08/08/2011 14:37:28
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01520429
Message ID:
01520432
Vues:
62
This message has been marked as a message which has helped to the initial question of the thread.
>What would be the best approach to verify for exclusivity of a file? I need to make sure a file is available before attempting a move.

I think in the final analysis you have to just try to move it, wrapped in a TRY...CATCH.

You might be thinking:

1. Check if anyone else is using the file
2. If not, move it

But, someone else could start using the file between 1 and 2. Yes, the time span between 1 and 2 may be small, and the chance of that happening low, but it could happen.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform