Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / retrieving lost code need help urgently

Author
Message
octave
21
Years of Service
User Offline
Joined: 6th Apr 2003
Location: U.K
Posted: 4th Aug 2005 12:34
hi there,

i need some help urgently pls has i've accidently lost the source code of one of my programs how would i be able to get it back if i can?

any help very much appreciated pls reply asap
octave
octave
21
Years of Service
User Offline
Joined: 6th Apr 2003
Location: U.K
Posted: 4th Aug 2005 14:48
what i've done is saved over the file and not actually deleted the file is there anyway i can retrieve the last file i saved in dbpro before i saved over it?

any help appreciated
octave
Satchmo
19
Years of Service
User Offline
Joined: 29th May 2005
Location:
Posted: 4th Aug 2005 14:50
Well i would say no because when you saved over it you deleted it.

New episodes of family guy sunday!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Aug 2005 16:51
check the backup subdirectory.

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 4th Aug 2005 17:56
Try opening up the .TMP file in the same directory with Notepad.

TDK_Man
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 4th Aug 2005 19:03
The Original IDE usually saves .bak files that are the same as the source, but it overwrites those after too many saves...

If you have Norton SystemWorks, it might record the overwrite of the file. If you do have it, open 'Start->All Programs->Norton SystemWorks->Norton Utilities->UnErase Wizard'

Also, sometimes source files are copied to the DBPpath\TEMP directory by the editor. Look in this directory and see if you can find your old source file.

And, next time remember to save multiple source files; they're small and won't fill your hard disk memory.

-Xol

master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 5th Aug 2005 12:02 Edited at: 5th Aug 2005 12:02
Let's put it this way. If you saved over your source, don't have a backup, exited the program so you can't undo the command......yep.....you might want to start over. This may not be the best news, but, to satisfy you, you should try what Xolatron and TDK said. Personally, I would desperately try TDK's option
Quote: "Try opening up the .TMP file in the same directory with Notepad."


Or, get yourself a new map <<<<Translate: Start Again>>>>
Sorry, but next time, remember to save backups of your code, or, periodically print it out. That's what I do.

octave
21
Years of Service
User Offline
Joined: 6th Apr 2003
Location: U.K
Posted: 5th Aug 2005 16:37
thanks guys who's helped

@ Xolatron :

I did your second suggestion of what to do as i do not have norton's system works and it worked but it was an very early version of the program but its better than nothing

and i will set myself a routine for myself by saving everything each time i update my programs separately source files and media files has its certainly taught me a lesson...
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 6th Aug 2005 02:21
Glad that you got some back .
I'll have to note to make an advanced backup system for my IDE...

-Xol

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 6th Aug 2005 10:28
I program like this:

Write code...
Save "Adventure1"

Write code...
Save "Adventure2"

Write code...
Save "Adventure3"

I change the number at the end every once in a while. That Kaboom game I made was on #6 (a month of work). The text adventure i'm making (that is now on hold) it's also been a month but it's on #8.

I know... i'm weird.
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 6th Aug 2005 21:31
I do that too, but my project that's 5-6 weeks old is already on save 45 !

-Xol

Dejunai
19
Years of Service
User Offline
Joined: 19th Jul 2005
Location: Mentally: Manhattan; Physically: LA -doh
Posted: 7th Aug 2005 04:58 Edited at: 7th Aug 2005 05:00
Having no intention to bump an already answered topic,
But wanting to further elaborate on techniques that keep
code safe, I thought I'd add my two cents.

I personally start a new piece of code in the appropriate
project folder, by windows-right-click>new>text document.
I then change the name to "<source>01.dba". I open DBPro
and use the "open source" function, letting it create a new
dbpro project file.

This ( within the original IDE ) skips any confussion
about an existing project folder.

Once I have my code to an acceptiable state, I prove it
to myself by compiling and executing the code. Save it and
Archive it as the existing <source>##.dba, <source>##.dbpro,
<source>##.exe, and the <source>##.bak...
Via the windows explorer.

Unless you live under a "really big rock" you have some archive
software available (ZIP,RAR) and unless you live under a
"kinda big rock near the really big rock" your archiver has
an explorer->right-click->interface.

I always archive the EXE as it will be functional according
to the version of DBPro it was compiled under. Suffice to say
that if you only archive your DBA only it may not compile
properly under a version upgrade of the compiler you later
use.

Once I know the archive is completed, I save my source as
<source>##+1.dba, then *important* I change my EXE name in the
project settings, and finally save my project
as <source>##+1.dbpro.

This is solid, basic advice for any coder in any language.

But specific to DBPRo and its original IDE, you can lose your
code often. I often get biten by opening an "include" file
via the "FILES" menu copying some small portion from it to my
main file and when I SAVE the contents of the "include"
file replace my main source. This seems to be a malfunction in
the drop down menu allowing you to switch between open files.
I also occasionally run into a bug where I atttempt to recompile,
and run my code, but a previous compiled version is still running.
For me this usually errors as an inability to open a file called
within my code. If this occurs, then the IDE is for all intensive
purposes locked up. No changes to either the source or the project
will be saved, and no error will be given when the attempt to save
either is made. At such occassions I CRTL-A/CRTL-C to copy all my
code to the clipboard. Close the IDE immdiately, and reopen it.
If the code is not upto date, CRTL-A/CRTL-V and paste the current
code from the clipboard over the incortrect existing code.
Also on occasion, for which I have no defining moment,
CRTL-C will error, along with any other copy,cut,paste
shorcuts within the IDE. In such cases "royally" skrewed is not
an overstatement. I switch to the windows explorer, and copy the
BAK and the DBA to their default "Copy of" and close DBPro IDE
immediately. You will lose your code content, upto the previous
two saves. But you will not corrupt it on closure of the DBPro IDE.

Veterens can probbally describe better the circumstances I am
sharing... Their history with the IDE will likely shed some light
on to the problems I have described. Likely they have even more
clues and triggers for determining if you are about to lose your
code.

As any good craftsman will tell you: "the mistake is not the
tool's, but rather the operator's inabilty to use it."

============ : Windows 200 SP4+, 3.2GHz Hyperthreaded
-Dejunai ............: 2GB RAM, nVidia 6600 256MB AGP 8x
============ : AC'97 basic A-Bit Motherboard Audio ( drivers always Maintained )
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 8th Aug 2005 12:23 Edited at: 8th Aug 2005 12:24
The worst is when you just made the most perfect code for your game/utility and then the power goes out before you save the changes.

*beeeeoooooppp* (blank screen)

NNNNNNNNOOOOOOOOO!!!!!
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 9th Aug 2005 03:23
Yeah I know that isn't cool. One time I was pointing my mouse to the save button, and I clicked, and then the power went out. I restarted my computer fearing that the file was corrupt, but, DB saves quickly because its mainly just text, and it saved. *Sigh*

Cyrez
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: Denmark
Posted: 9th Aug 2005 05:43
If your using Windows XP you could try doing a System Restore..

Start menu > All programs > Accessories > System Tools....

Login to post a reply

Server time is: 2024-11-27 21:32:59
Your offset time is: 2024-11-27 21:32:59