Mac for drector.

Jennifer Hall jennifer at jennifershall.com
Wed Aug 9 07:35:10 CDT 2006


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
 

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


_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list