11
votes
Vote UpVote

FieldByName, FindField: too convenient to be honest

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. ...
Favorite? Off-Topic? Fran├žois Gaillard @ 2010-11-29 02:08

Statistics

Visits: 1642
Votes: 11
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Charles Ardour
Jan Derk
Mohammed Nasman
Ph. B.
Primoz Gabrijelcic
Rob McDonell
Sergio
stukelly
Tier777
vcldeveloper
Zzzzz
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

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