Mac for drector.
Fred Step
fred.stephenson at communication-unltd.com
Wed Aug 9 13:53:57 CDT 2006
Jennifer Hall wrote:
Don't know if this is any good to you but the database will be listed if
you do an lsof in the terminal. easy to do in Rb but I don't know if you
can do this in director.
Fred
> Wow, thanks.
> If a data base is busy on a mac, will it always return an error when you try
> to read it???
> Jennifer
>
> -----Original Message-----
> From: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of Ruslan Zasukhin
> Sent: Wednesday, August 09, 2006 2:32 AM
> To: valentina at lists.macserve.net
> Subject: Re: Mac for drector.
>
> On 8/9/06 4:09 AM, "Jennifer Hall" <jennifer at jennifershall.com> wrote:
>
> Hi Jennifer,
>
>
>> I'm using Valentina 1 for director on both the Mac and the PC.
>> In trying to detect if a database is busy I'm using the following code.
>>
>> ---------------------------------------
>> --use actual valentina data base call to open
>> openDatabase(pCurrentDataBase, dbpath, 4)
>> err = ValentinaError()
>> if (err <> 0 ) then
>> -- error while open data base
>> return err
>> end if
>>
>> pRef = pCurrentDataBase.getRef()
>> -- return negative number if error, else returns 0 if no error
>> err = ValentinaError()
>> if (err <> 0 ) then
>> -- error while open data base
>> return err
>> end if
>>
>> sql = "select Name, PretestOn, PasswordOn, MasteryLevel, RecID from
>> Classes"
>> pCursor = xtra("VCursor").new(pCurrentDataBase.getRef(), sql,2,3,2) --DC
>> err = ValentinaError()
>> if (err <> 0) then
>> return []
>> end if
>> --------------------------
>> I've set it up for the test so that I know a specific data base is busy.
>>
> On
>
>> the pc, the openDatabase call returns an error and you know it's busy.
>> However, on the mac, I don't get an error until the pCursor call.
>>
>> Any idea why and any suggestions to get the Mac to recognize an open
>> database.
>>
>
> Mac OS X do not have exclusive mode of file open. This is why.
>
> Apple recommend resolve this creating near to file you open
> A tmp empty may be hidden disk file. So other app must check at first if
> this file present..
>
> Sounds like nightmare, but this is how linux work
>
>
>
More information about the Valentina
mailing list