I read a blog post (at the moment I can’t find the link), where the author said that it is faster to assign a local variable than to use ADOQuery.FieldByName ('...'). asString or TSQLQuery.FieldByName ('...'). AsString when parsing an entire query with several thousand records. I do not see the difference between
var aLocalField: TField;
....
aLocalField := ADOQuery.FieldByName('...');
..
ShowMessage(aLocalField.asString)
and using directly
ShowMessage(ADOQuery.FieldByName('...').asString);
The blog post did not say anything about the type of database or version of Delphi. Is this solution related to one or another (and I'm not talking about obscure / user database systems)?
source
share