Vote UpVote

FieldByName, FindField: too convenient to be honest

Francois on Delphi – 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. ...
Favorite? Off-Topic? François Gaillard @ 2010-11-29 02:08


Visits: 47
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)