If you ALTER a table which contains data and add a field which is NOT NULL, after backing up the database GBAK will fail on restore unless you supply values to existing records with the error:
Validation error for column xx, value "*** null ***"
Example:
create database 'test1.gdb';
create table test1 (f1 int);
insert into test1 values (0);
commit;
alter table test1 add f2 int not null;
gbak test1.gdb test1.gbak
gbak -R -N test1.gbak test1a.gdb
The easiest way to supply default values for existing records in this example is to use the default clause when using alter table:
Example:
alter table test1 add f2 int default 0 not null;
Last Modified: 08-MAY-01