Multiple Application Instances Opening same local db file
Ruslan Zasukhin
ruslan_zasukhin at valentina-db.com
Sun Feb 27 16:20:02 CST 2011
On 2/27/11 7:02 PM, "Ernesto Giannotta" <erne at apimac.com> wrote:
Hi Guys,
>>> Is there a way to tell the file has already been open?
>>
>> On linux exists technique of lock file.
>> YOUR family of apps, can follow to rule
>> That app check for my_db.lck file
>> If not found then it can open it and create such lock file.
>>
>> All others will see lock file and not touch db.
>> E.g. Archicad do this on WIN and MAC ...
>
> in Cocoa when I try to open an already open DB Vale gracefully throws an
> NSException whose name is:
>
> File "Untitled Notes.notepad" cannot be opened because it is used by another
> application.
>
> How does she know?
Ops, I really have point linux-only way.
On MAC OS X and Windows all is simpler.
Valentina engine open local db files in the EXCLUSIVE mode,
so other apps if try will get back OS error -- file is busy.
> BTW why you set the name and not the reason with this info?
?
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list