main logo
Subject: Re: error -61 question
Author: Charles Yeomans
Posted: 2001/11/30 14:13:45
 
View Entire Thread
New Search


On Friday, November 30, 2001, at 12:40 PM, Ruslan Zasukhin wrote:

> on 11/30/01 18:38, Charles Yeomans at yeomans (AT) desuetude DO.T com wrote:
>
>> I've got a user who got a -61 error on attempting to get a cursor.
>> Error -61 appears to be a File Manager error -- read/ write permission
>> doesn't allow writing. Given that it appears he was able to
>> successfully create a database file, what else might cause this?
>
> I read that -61 is Write permission error...
>
> May be he have lock db files ?
> or put them on licked volume ?
>

I'd expect that these problems would cause MacOS errors -45 (File is
locked), -46 (Volume is locked through software) or -54 (Attempt to open
locked file for writing). I think error -61 is caused when one attempts
to write to a file opened as read-only.

But in exploring this further, I've found the following (OS X.1.1).
Suppose you lock a database file in the finder and then open it. This
works, but then I call the following code.

c.SetBlank
If c.Add then
bo.Flush
me.recID = VULong(c.Field("recID")).value
c = nil
me.manager.Add(me)
Else
Raise new ValentinaException(db)
End if


I would expect that either c.Add would return false, which it does not,
or more likely an error would occur upon calling bo.Flush, but no error
there either. Instead, what happens is that
VULong(c.Field("recID")).value returns 0, instead of the recID of the
new record.

Since Valentina can work with locked files and files on read-only
volumes, I'd expect that any Valentina call which changes the database
should result in an error.

Charles Yeomans
 
©2001 Charles Yeomans
<-- Prior Message New Search Next Message -->