Restoring Old Backups



Restoring Old Backups

The database format, and database filename, was changed between version 2.70b of DONATION and earlier versions. In those earlier version, the database filename and backup filename were both DONATION3.DB. In version 3.00 of DONATION (first released in late 2007) and later versions, however, the database filename is DONATION4.DB, and the backup filename is DONATION4.DB.GBK, DONATION-YYYY-MM-DD.DB.GBK, or DONATION-YYYY-MM-DD.HH.MM.SSDB.GBK, where YYYY-MM-DD is replaced by the date the backup was made and HH.MM.SS is replaced by the time.


There are a few situations in which you may need to restore an old-version database file to DONATION. The most common is when your organization has been running a much older version of DONATION on a computer, and you buy a new computer (or switch to a new Treasurer or Envelope Secretary) and put a new version of DONATION onto that other computer.


If you try to use the normal Backup/Restore ⇒ Restore Database menu option to restore the backup file from the previous computer, it will not work, because the backup file is named DONATION3.DB but the normal Restore Database option is looking for a new-style backup file with a name ending in ".GBK". Don't try to rename your file to be like that! Instead, use the menu option Backup/Restore ⇒ Restore Old Database (DONATION3.DB).


Note: Users of the Network Client version of DONATION cannot restore old backups - that must be done from the Network Server version.


Note: If you use the Database ⇒ Switch Databases menu option to maintain multiple databases on one computer, and your current database is named something else (say DONATION4.OTHER), then the title of this menu option changes accordingly, for example to Backup/Restore ⇒ Restore Old Database (DONATION3.OTHER). (The filename of the database file you need to restore also changes accordingly, to DONATION3.OTHER, but the rest of the instructions below will refer to the standard filename, DONATION3.DB, for simplicity.)


This is a slightly complex routine, so please read the various messages and questions that come up as you run it carefully.


One main issue you may run into using this option is that you can only use it if an earlier version of DONATION (2.70b or earlier) has also been installed on this same computer that you are running it on, or at least the database software that it used has been installed. If it hasn't been, you will be informed of this, and offered an option to have the program automatically download and install the version 2.70 database software for you (the installation file name for that is named DB27C.EXE, and is only about 3MB). You should answer Yes to this, then let the program download and run that installation file. Just accept all of the defaults in the installation program as it steps through its various screens. That will then make it possible to re-run this menu option successfully, without otherwise affecting your current version of DONATION. So, there's nothing to worry about in doing this. After you have done that installation, you will be prompted to re-run Backup/Restore ⇒ Restore Old Database (DONATION3.DB) to actually do your restore.


Once this routine has ensured that you have have the version 2.70 database software installed on this computer, it will prompt you for the DONATION3.DB file to restore, with a "Restore Backup File" dialog box. Navigate to the directory that holds your backup file (named DONATION3.DB) from the earlier version of DONATION, and select it there.


After this, it will give you a couple of further confirmation messages about what it is doing, and finally (if everything has been successful so far), it restarts the program, and it will prompt you with a large message box to convert the data from the old database format in the DONATION3.DB file to the new database format in the DONATION4.DB file. Answer Yes. (This triggers the Converting Data from Prior Versions of the Program routine.)


Once the conversion is completed, your old database file will have been fully restored, and converted into the new database format.


Restoring for users of the Network Version of DONATION


Only a user on the computer that has the Network Server version installed on it can do restores of old (or new) database backups. Users of the Network Client version will receive a message explaining that they cannot do restores.


Error Messages about "Conversion error for string"


A few users, when doing this conversion, have gotten an unusual error message. After they answer Yes to the large prompt to convert your data, and it starts converting, they see an error message something like the following:

Error transferring data for table DONOR:
Maximum number of errors exceeded.
SQLSTATE = HY000 [ODBC Firebird Driver][Firebird] Dynamic SQL Error SQL error code = -303 conversion error from string "A1234"
Please contact Cooperstock Software at or (416) 423-7722 for assistance.

(The boldface part on the 2nd line above isn't actually bold in the message - it is just highlighted here to help you identify that it is the part of the message that implies that this part of this Help topic is the solution to it.)

This problem occurs when you have Member/Envelope numbers in the old program’s database that aren't technically legal, because they contain either letters or other characters that aren't digits. They are only supposed to be numbers. The program normally wouldn't let you enter anything other than numbers (like 123) for the Member/Envelope number, but if you used one of the Import routines (like Database ⇒ Import Donors) to import the data, it would unfortunately let you import values that otherwise wouldn't be allowed.
In the current program, the Member/Envelope # is stored in the database as an actual number (not a string of characters that the program was just forcing to be only numbers, as in the old program), and thus on conversion, you run into problems if there are characters etc., when you are doing the conversion.
Your best bet is to do as follows, if possible.
First, install version 2.70b on a different PC (assuming you don't already have it installed on a different PC!), that doesn't have a current version of DONATION installed on it. It can be downloaded from the web address After installing it, restore or copy your current database file, DONATION3.DB, to that PC, in the directory C:\Program Files\Donation\Data (on a 64-bit computer, it will go in C:\Program Files (x86)\Donation\Data).
Next, run that version of DONATION. You may have to do that by right-clicking on its icon and picking "Run as Administrator" from the popup menu, if it does not work properly otherwise. Go to the Database ⇒ SQL Select menu option. Copy the following lines out of this Help topic, and into the text entry box in the window that comes up:

select Lastname, Firstname, membernumber 'Member/Env. #', Year
from donor
where membernumber like '%[^0-9]%'
order by membernumber, year

That will show you any Member/Envelope #s that aren't just numbers, along with the donor's name, and the year of data in which that occurrence of the bad value appears. Print that out, go back to the main window, and find and fix those numbers to be pure numbers (again, like 123).
If you have been using DONATION for more than one year, the same bad Member/Envelope #s may appear in prior years' donor data as well (each year gets its own copy of each donor), so you need to fix them there as well. (You will know this is an issue if you see multiple Year values in the printout you generated above.) Use Maintenance  ⇒ Change Year ⇒ Previous Year to go back to any prior years that exist in your database (if it prompts you to create the prior year, answer No, because that year doesn't exist). Then find and fix those same bad Member/Envelope #s in each year.
Then exit that copy of DONATION version 2.70 and copy that fixed database file (DONATION3.DB) from C:\Program Files\Donation\Data on that PC (on a 64-bit computer, it will be in C:\Program Files (x86)\Donation\Data) to a directory on your normal PC where you have installed the current version of DONATION. Then start DONATION on that PC, use the Backup/Restore ⇒ Restore Old Database (DONATION3.DB) menu option again and specify that fixed copy of the DONATION3.DB file, and it should all convert OK. If not, contact us for further assistance.