Assertion failure with DBTools.h++ examples

Article ID: 1079
Last updated: 29 Jan, 2008
Article ID: 1079
Last updated: 29 Jan, 2008
Revision: 1
Views: 2608
Posted: 31 Dec, 1999
by --
Updated: 29 Jan, 2008
by
Problem


I am running into a problem when I run the tutsetup.exe.

 

    Assertion failed: ((!needAll || maxdigits == 0)) != 0,
      file D:/spm/parts/tls0710wsourcesrclocale.cpp, line 1068



Cause


When Tools.h++ libraries are built with the RW_CENTURY_REQD flag, the use of four-digit years is enforced. The normal behavior when a 2-digit year is encountered in debug mode is an assertion failure such as this:
    Assertion failed: ((!needAll || maxdigits == 0)) != 0,
      file D:/spm/parts/tls0710wsourcesrclocale.cpp, line xyz

       

The problem when running the DBTools examples is that the data files contain 2-digit years.


Action


The solution is to modify the data files to use 4-digit years exclusively. The data files you need to change are:
    purchase.dat, rental.dat, and t4in.dat
You may change these files once for all builds in the directory:
    ..spmpartsdbt0320wexamplessrc
Then rebuild the DBTools examples. This will affect all subsequent builds of the examples.

You may also change the data files for the specific build you've done by going to this directory:

    ..spmworkspaces(OS)(compiler)(buildType)dbt0320wexamples
After the files are modified, run tutsetup again.

(These examples indicate DBTools 3.2.0. Change the version number according to what you are using. On Unix, the w on dbt0320w should be changed to u.)

The data files will be corrected in a future version of DBTools.h++.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 1079
Last updated: 29 Jan, 2008
Revision: 1
Views: 2608
Posted: 31 Dec, 1999 by --
Updated: 29 Jan, 2008 by

Others in this category