Francois on Programming – I don’t know about you, but I can’t count anymore the number of times I’ve seen this code pattern (in code snippets online as well as in production code): while not ADataSet.Eof do begin [...] ADataSet.FieldByName('MyFieldName1').SomePropertyOrMethod; ADataSet.FieldByName('MyFieldName2').SomePropertyOrMethod; [...] ADataSet.Next; end; Using FieldByName in a case like this is certainly very convenient and has a lot of advantages: Clarity and readability. The intent of the code is obvious and there is no question about which Data point you work with. ...
Visits by Source
Users who voted for this posting