Hi
I have a field 'staatus' which is declared NOT NULL DEFAULT ''
Query.SQL.Text := 'SELECT * FROM dept WHERE deptno=10';
Query.Edit;
Query.FieldByName('staatus').AsString := '';
Query.Post;
and then I get Error "Field 'staatus' must have a value"
Field must have a value error
When PgDAC generates an INSERT statement to add a record, only fields that have non-empty value are added to this statement. So if you don't assign a value to a field, it will get the default value.
Check that the SQLInsert property of TPgQuery is empty. In this case PgDAC generates INSERT statements at run-time.
Check that the SQLInsert property of TPgQuery is empty. In this case PgDAC generates INSERT statements at run-time.