How to recover a db after app crashes?

Tiemo Hollmann TB toolbook at kestner.de
Mon Oct 13 09:36:12 CDT 2008


Hello,

When my RunRev app with an encrypted db crashes on Win and I want to restart
I get an error when trying to open the db that "Object is not encrypted".
What I coded is:

        -- initialising here

        get VDatabase_Open( gDBRef, tDbPath )

        if VDatabase_ErrNumber(mDBRef) = 398594 then

            get VDatabase_UseEncryptionKey( gDBRef, MyKey,
"kStructureAndRecords"  )

            get VDatabase_Open( gDBRef, tDbPath )

        end if

        if VDatabase_ErrNumber(gDBRef) is not "0" then

            answer "DB could not be opened" && VDataBase_ErrString(gDBRef)

        end if

        if( VDatabase_IsEncrypted( gDBRef ) ) and
(VDataBase_IsStructureEncrypted( gDBRef )) then

            get VDatabase_Decrypt ( gDBRef, MyKey, "kStructureAndRecords" )

        end if

  

The VDataBase_ErrString(gDBRef) tells me "Object is not encrypted" though I
first try to open without using encryption key.

What is the correct way to handle opening a crashed db?

Are there any "recovery" commands for crashed Apps/DBs? And if yes, how to
use them? How are your approaches on this?

Thanks for sharing

Tiemo

 

 

 

 

 

 



More information about the Valentina mailing list