Problem closing databases (SOLVED), but asking more questions

Matthew Jew mjew at icnc.com
Sun Oct 5 16:37:27 CDT 2008


Bill,

I think that may be the answer to my problem.

I do have two entirely separate applications running that access the
same data. They are autonomous regarding what databases they open and  
close,
and they do a good job of not opening a database when the other
is using it.

However, if you add a human to the mix, then anything can happen.

I closed out the applications, and have not had the problem re-occur.

Thank you very much for the suggestion.

I wish Valentina had some internal/automatic flag that let an  
application
know when another application had a given DB open.
Or does it already do that, and I am unaware of checking for it?

I know I can set up a flag/file manually, but is there a way to
tell on Mac/unix when another application has a given database open  
already?

My concern with "rolling my own" is what happens when an application
puts in place an "I am using this database" flag/file, then crashes
and leaves the "I am using this database" flag/file in place forever.

My current system relies on the compatible logic of the two apps, and
does not use any flags/files to mark a database as being in use.

What do people do to prevent this problem?

And does opening a database as read-only solve the problem?

If so, how exactly does one open a database as read-only?

- Matthew


> Matthew
> I used to have that crash on closing the database all the time and  
> it was
> before I very carefully made sure that I only use a copy of the  
> database in
> vStudio and use the original database in my other program (RunRev).  
> You will
> find that you can accidently run both programs accessing the same  
> database
> (we're talking single user mode here) on Mac OS X and sometimes even  
> quit
> one program and think it has closed the database while it actually  
> hasn't.
>
> The best system is to have two copies of the database.
>
> Bill




More information about the Valentina mailing list