Subject strange behavior with Timestamp
Author rr@rrnet.de
Hi,

I've just realized the following problem:

---snip---
procedure TfrmVessels.mETAClick(Sender: TObject);

var
dtETANew,
dtETA: TDateTime;
begin
dtETA := dmKogge.qVesselAuswahl.FieldByName('ETA').AsDateTime;
dtETANew := GetETADZeit(dtETA,snETA);
if dtETA = dtETANew then exit;
// only for testing purposes
dtETANew := Now;
dmKogge.qVesselAuswahl.Edit;
dmKogge.qVesselAuswahl.FieldByName('ACTSTATE').AsInteger := snETA;
// Alternate 1: the follwing line causes the error!
// dmKogge.qVesselAuswahl.FieldByName('ETA').Value := dtETANew;
// Alternate 2: just for testing, this line produces no error!
dmKogge.qVesselAuswahl.FieldByName('ETA').Value := Now;
dmKogge.qVesselAuswahl.Post;
trKogge.CommitRetaining;
// with Alternate 1 I get the message: "pilotno is a required field"
// but there is no field "pilotno" in qVesselAuswahl !
// qVesselAuswahl is TIB_Query, no master-detail only 1 Interbase
// table, CheckRequired = false
dmKogge.WriteVesselLog(dmKogge.qVesselAuswahl);
end;
---snap----

Any suggestion?

Regards

R. Reddemann