Mac for drector.

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Aug 9 09:31:52 CDT 2006


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
 

-- 
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