V4RB Windows bug error 524

jeff benjamin jeffb at interactiveink.com
Wed Apr 2 20:52:13 CST 2003


A few hours of testing and narrowing down the issues has produced 
definitive results. I will forward to Ruslan a small RB file which 
reproduces the error.

Here is what will cause what I think is an erroneous #524 error:

Begin with a structure-encrypted db. Make the file read-only (locked in 
the Mac Finder or read-only with Windows properties).

Execute two 'open' commands, the first to determine that the file is 
encrypted (error = 328 when the file is unlocked, 5 if locked). Before 
the second, set the encryption key (SetStructureEncryption). Second 
open command (if running on Windows and the db file is locked) will 
produce error 524. On Mac, no error.

Thanks for the tips. I hope this info may be useful to someone in the 
future.

-jeff


=================================================================


Sample code snippet:


     w.mDataBase = new MyDataBase
     res = w.mDataBase.Open( f )

     if(res = false) then
       MsgBox "Can't open database. Error: " + 
Str(w.mDataBase.ErrNumber) // errnumber = 328 if file is not locked, 5 
if it is locked

       w.mDataBase.SetStructureEncryption( "1" )

       res = w.mDataBase.Open( f )   // BOOM - this is where the error 
occurs only on Windows if the file is locked - error #524

       if(res = false) then
         MsgBox "Can't open database. Error: " + 
Str(w.mDataBase.ErrNumber) // no error if file is not locked, 524 if 
file is locked
       else
         return false
       end if



       return false
     end if



More information about the Valentina mailing list