Subject | Re: Default value for Required property in TIBOQuery |
---|---|
Author | |
Post date | 2018-10-24T10:55:19Z |
Hmm... now it works. So i have to write it all again. Bummer.
Just did a little test with an TIBOQuery. I do not suffer from this problem.
My query has five fields. I right-click on it in the IDE and select "Edit Query".
This, as you might know, brings up the IBO Design-time Query editor.
Here, in the "Fields" tab when i have prepared the query i can see two fields /without/ "NULL". The names are PRJ_ID and PRJ_DATE_STARTING.
So i put this code in an button click event:
for I := 0 to IBOQuery1.Fields.Count - 1 do
Memo1.Lines.Add(IBOQuery1.Fields[I].FieldName + ' Req: ' + BoolToStr(IBOQuery1.Fields[I].Required, true));
This is the result:
PRJ_ID Req: True
PRJ_READABLE Req: False
PRJ_NAME_SV Req: False
PRJ_DATE_START Req: True
PRJ_DATE_ENDING Req: False
So... what to do?
* Check your IBO version. Latest? Stable?
* The TDataSet base class (and other) has changed in later Delphi updates. Check if you have an Delphi version where this might not work properly (?). Not sure about this though. Should not be important.
* Check how you are using the SchemaCache functionality of IBO. Maybe you just have to clear out the cached schema file for nullable fields?
* Check the TIBOQuery.FieldOptions property.
* Check the ColumnsAttributes.tab in the Design-time Editor. Here you have an option to override the server "nullable" for each field. Same as the TIBOQuery. This tab reflects the TIBOQuery.ColumnAttributes property.
HTH,
/Dany