Subject | Re: Problem with GetByName |
---|---|
Author | |
Post date | 2017-09-05T11:57:08Z |
Hi Helmut!
Jason did not decide this behaviour, check the documentation for
Data.DB.TDataSet.FieldByName
and
Data.DB.TDataSet.FindField
it clearly states that FieldByName throws and exception and FindField return nil.
What IBO does do is delivering helpful mechanisms on top of that.
Anyway - historically IBO probably had a bug allowing you to test the nil return value. However a lot of code out there is written like stated in the documentation and that would not work. So to help IBO users to correct their code, i'm (but have not checked) that that long initialization flag was put there to ease you migration.
On this topic but another note, a lot of searchin for fieldnames is expensive in the Delphi TDataset world. These's stuff (not IBO related) to google.
Hope this helps and more knowledgeable people pls correct me when i'm ignorant.
/Dany