While not IBQuery_Margin.Eof do begin
// For i:=0 To IBQuery_Margin.Fields.Count-1 Do s:= s + (IBQuery_Margin.Fields.FieldName); //Or IBQuery_Margin.Fields.DisplayName
For i:=0 To IBQuery_Margin.Fields.Count-1 Do s:= s + IBQuery_Margin.Fields.DisplayName;
end;
makes - ou? - the thing freeze.
I found it, if I right-clicked the IBQuery_Margin and said "edit fields" (in German = bearbeiten).
There I found listed: Margin and datum (=date) and NOT Ware.
"Ware" is the one which has been the prob lem all the time.
See screenshot.
Is there a way to give the beginner-user an error message, if this happens reading,
"you dummy have used the field editor and not added the field, you request now"
or
Do anything from programmer-side, that the field-editor fields do not "hide" fields?
or
Do not allow to use those field-edited-queries any more for other queries?
(this is tricky as it may block code, which worked for years)
Is there a way to give the beginner-user an error message, if this happens reading,The Fields Editor is part of the Lazarus/Delphi IDE and the TDataset model and this is common behaviour for all database drivers. It should avoid you having to use the inefficient "FieldByName" method. When you add a field using the fields editor, it adds a reference to the field as a property of the form allowing a more efficient way of accessing a field by a property name rather than having to look up the field by name at run time. If, once you used the fields editor, you always accessed fields as form properties then the compiler would tell you when you haven't added a field using the fields editor.
"you dummy have used the field editor and not added the field, you request now"
or
Do anything from programmer-side, that the field-editor fields do not "hide" fields?
or
Do not allow to use those field-edited-queries any more for other queries?
(this is tricky as it may block code, which worked for years)