### I need a solution please... Thankyou ###

  • Thread starter Thread starter BuzzLight
  • Start date Start date
B

BuzzLight

Hello, I would like my program to somehow lock a file on the file system ... say c:\myfile.mdb... so when the program is running the file is un-moveable, but NOT un-editable, This is to prevent users from moving the file during program execution.. which would lead to alot of errors in the program if it were allowed.

My perfect solution will be one that does not invlove opeing the file... as I know if you open the file you will have access exclusively to it... but this method makes it uneditable to other processes.. (not what I want)

Please help.

thankyou
 
Hi BuzzLight,

I cannot come on a solution.
But I started to understand what the problem can be.

You describtion does not tell this, because mostly when a user is busy with
a file it is locked and you cannot move it.

However when you have an access database in an ado.net situation, it is
mostly disconnected.
In that time it can be removed while the user is busy with his disconnected
dataset.

Is that where you want a solution for?

(By the way I do not know one direct but maybe someone else say, that is
easy just do that)

Cor
 
Have you thought about just copying the file away to a temp folder and
working with it there? (Though I really can't think of a situation where,
if users are changing a source file during processing, you're going to get a
stable solution.)


BuzzLight said:
Hello, I would like my program to somehow lock a file on the file system
.... say c:\myfile.mdb... so when the program is running the file is
un-moveable, but NOT un-editable, This is to prevent users from moving the
file during program execution.. which would lead to alot of errors in the
program if it were allowed.
My perfect solution will be one that does not invlove opeing the file...
as I know if you open the file you will have access exclusively to it... but
this method makes it uneditable to other processes.. (not what I want)
 
Back
Top