Odd File Error

jda jda at his.com
Tue Nov 27 06:20:40 CST 2007


On Nov 27, 2007, at 2:31 AM, Ruslan Zasukhin wrote:

> On 26/11/07 9:53 PM, "jda" <jda at his.com> wrote:
>
>>> * try search Valentina list archive
>>>
>>>        http://leafe.com/archives/search/valentina
>>>
>>> For "lock file". This is standard UNIX technique.
>>>
>>
>> I know about the OS X issue, but Valentina might be able to tell a db
>> is already open when you open it with Valentina itself
>>
>> db.open(f)
>>
>> No?
>
> Yes. Exists property  db.IsOpen
>

But that doesn't help. I open the db and of course isOpen = true. I  
can't get at that property without opening the db first, can I?

If not, I have another idea. What about an open "counter" that  
increments every time a db is opened and decremented whenever a db is  
closed? That way I could do this:

db.open(f)
if db.openCounter > 1 then
   db.close
   db.nil
   return
else
   work with db
end if


Jon



More information about the Valentina mailing list