How To Prevent Multible Users Of Application From Clobbering Each Other

  • Thread starter Christopher Lusardi
  • Start date
C

Christopher Lusardi

How can I prevent multible people, who use my program at the exact same
time, from overwritting textfiles? E.G.: Two users start the same
program and one deletes something but the other saves his data and
undoes the delete that was done!

Also, what about databases being overwritten at the same time. How can
I prevent users from interfering with each other?

Thank you,
Christopher Lusardi
 
C

Cor Ligthert [MVP]

Chrisopher,

Normally with a normal open for write you cannot overwrite a text.file.
However some classes overwrite automaticly as by instance the ds.XMLWrite
Therefore just testing is always the best.

However the File class gives you a lot of information.
By instance the File.exist(path)

For databases the word for this is concurrency, if you check for that on
Interenet you get a lot of information.

http://msdn.microsoft.com/library/d...skPerformingOptimisticConcurrencyChecking.asp

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top