Dump/Restore Causes Crash With No Error...

Ruslan Zasukhin sunshine at public.kherson.ua
Sun May 25 11:41:17 CDT 2003


on 5/25/03 10:38 AM, Kimball Larsen at kimball at kimballlarsen.com wrote:

Hi Kimball,

> Heya folks.. I'm fairly new to Valentina and very new to this list..
> but I'm stuck, and hope someone can help.
> I have searched the list archives, but have not found a solution to my
> problem.  Here's some background.  I want to have a utilities section
> in my application that includes buttons for both backing up the current
> database and restoring a backup of a database.  I plan to use the xml
> format.  The backup/restore seems to work just fine (ie, I can backup
> to an xml file just fine, and the database restore function runs fine
> and does restore the database from the xml file.. ).  However - after I
> do a restore, as soon as I do anything else in my app that requires the
> database, the whole application quits, with no error message or warning.
> 
> Here is the code for my restore.  newDB is the existing global object
> that is of type VDatabase.
> 
>  dim dumpFile, dbFile as folderItem
>  dim importedDB as VDatabase
>  dim res as boolean
>  newDB.close
>  //newDB = nil
>  dumpFile = getOpenFolderItem("????")
>  dbFile = getFolderItem("db.vdb")
>  dbFile.delete
>  importedDB = new VDatabase
>  importedDB.loadDump(dumpFile, dbFile, 2)
>  importedDB.close
>  importedDB = nil
>  //newDB = new vdb
>  dbFile = nil
>  //res = newDB.open(dbFile)
>  newDB.init("db.vdb")
>  msgbox ("Database Restore Complete.")
> 
> As I said, the restore runs just fine, but it appears that there is
> some sort of a problem with newDB after the restore is done, because as
> soon as I try to use it, the whole app crashes.
> 
> Suggestions?  What am I doing wrong?

I do not see obvious mistakes.

On what line it crashes?
What do NewDB.init() ?


Have you made steps in debugger to see if Db object is not nill ?

Have you try set debugLevel = 2 for Valentina and watch console output ?
Try this, may be you will see some error code from Valentina.

It seems Erne, have utility that do XML dump/load.
Look into archive of V4RB/ThirdParty, it seems vExport project,

Also project _TEST have it in one of tests.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list