Default Field Value
Posted: Tue 29 Dec 2015 22:47
Dear Sirs,
I have simple table:
when I try to populate data from code in runtime assigning only Name field with code:
I get an error:
First chance exception at $7723C42D. Exception class EDatabaseError with message 'Field 'Downloaded' must have a value'.
Why the DEFAULT field value is not used instead?
Michal
I have simple table:
Code: Select all
CREATE TABLE Files (
Name CHAR(28) NOT NULL,
Downloaded BOOL NOT NULL DEFAULT False
);
Code: Select all
begin
ltFiles.Append;
ltFiles.FieldByName('Name').AsString := FileName;
ltFiles.Post;
end;
First chance exception at $7723C42D. Exception class EDatabaseError with message 'Field 'Downloaded' must have a value'.
Why the DEFAULT field value is not used instead?
Michal