File error

jda jda at his.com
Sat Nov 24 11:01:00 CST 2007


Hi Ruslan,

I'm running into a problem I don't understand, but I hope you can  
explain.

I have a db in a single file (RB). If the user tries to open in a  
window already open I don't want to open it again, and if the user  
tries I put up a warning. Here's the code:

   f = DesktopFolder.child(dSyncDBName)

   if f.IsReadable = false or f.IsWriteable = false or f.Locked = true  
then
     MsgBox("You don't have read/write permission for the database “"  
+ dSyncDBName + "”")
     return
   end if



This works well. But when I then ultimately close that window  
Valentina throws an exception on this line:

myDatabase.flush

The error is -38, file not open.

But in the RB debugger myDatabase is show with isOpen = true.

Do you have any idea what is going on?

Thanks,

Jon


More information about the Valentina mailing list