[V4RB] How to detect if database is already opened?

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jun 2 12:02:23 CDT 2003


on 6/2/03 11:37, Wonder Fef at wonderfef at noos.fr wrote:

>> Does this help or at least clarify?
> Yes, it does, but it does not solve my problem, even if it's not that
> important anyway, since it's not a problem on Windows anymore.
> 
> Ruslan wrote:
>> for OS X, there is KNOWN issue with double open.
>> IT seems if you open from Windows then OS X is foolish.
>> I afraid only in 2.0 I will be able work out this.
> So, I'll be patient.

You can try resolve this self now in this ways

1) use self File Locks for OS X, directly from RB code.
    Only OS X based files must be locked.
    IF RB allow this then you can try this.
    on db.Open() you need self set a lock on file.
    then before second Open() you should check if this lock exists.
    Note, that lock DO NOT prevent second open.
    You  can just check if it is here and refuse open second time.

2) you can try to keep own small file together with database.
And use this file as flag that db is opened.

    if own file not exists then
        db.Open()
    create own file...

    db.Close()
    remove own file


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list