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 )