Source language: Translate to:

NeoBookDBPro - Delete extracted database

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

NeoBookDBPro - Delete extracted database

Postby Skarabäus » Sun Feb 03, 2008 4:44 am

Dear neobookers,

i extract a file out of compiled .exe:

Book properties/Register Startup
ExtractFile "[Embedded]ab.mdb" "[PubDir]ab.mdb"

If the compiled .exe will be exit by user the extracted file shall be deleted
so that everything is "clean" on user's computer.
I tried this with following code:

Book properties/Register Shutdown
FileErase "[PubDir]ab.mdb"

Startup and .exe itself works fine but if i exit the .exe i get following alert:

"Error" Unknown Error #32

And the database is still existing. :cry:

Every opinion is welcome!

Skarabäus
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern

Postby Gaev » Sun Feb 03, 2008 6:58 am

Skarabäus:

a) Do you still get the Error (when you try and exit from the program) if the FileErase command is (temporarily) removed (commented out) from the ShutDown section ?

b) If you do ... meaning the error is related to this command ... try ...
Code: Select all
FileErase "![PubDir]ab.mdb"

... also make sure the database is closed before you try and erase the file ...
Code: Select all
dbpCloseDatabase "database id"
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Skarabäus » Sun Feb 03, 2008 7:18 am

Gaev:

my mistake was not to close the database before erase it.

The solution is as follows:

Book properties/Register Startup:
ExtractFile "[Embedded]ab.mdb" "[PubDir]ab.mdb"

Book properties/Register Shutdown:
dbpCloseDatabase "Database"
FileErase "[PubDir]ab.mdb"

This works fine.

I hope that everyone profits from my mistakes. :oops:

Thank you Gaev!
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest