Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello! I'm using database (files - .mdb) through cloud (like Dropbox). when i open one of mdb files it create a ldb file wich it Ok by me but i need that if someone want to open the same mdb file he will get popup/post that the file is locked for changes and it for reading only for example like word/excel document. how can i do that???!!!
Posted
Comments
Mohibur Rashid 6-Jan-15 2:55am    
I don't know much about dropbox, What I need to know is where does it create a idb file? on the dropbox or on the computer? One solution can be create a tempfile in the drop box. If the file exists then other application will not continue. idb file will not be a solution. And the whole process is odd and useless. This is not how you should make a multi-user application
Lucian Todor 6-Jan-15 9:40am    
It is recommended for the temporary file to use the "lock file" mechanism.
Create lock file, use resource, unlock.

See
LockFile - for windows
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365202%28v=vs.85%29.aspx

flock - for linux
http://linux.die.net/man/2/flock

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900