Subject Re: [IBO] data access by FieldByName or []
Author Jason Wharton
> I have seen at least two different ways to access data -
>
> String := Query['FieldName'];
> String := Query.FieldByName('FieldName').AsString;
>
> Are these equivalent? Is one better than the other? Thanks.

They are not equivalent.
One returns a variant and the other a string.
The biggest difference is how NULLs will impact you.

It's your preference.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com