Subject Re: [IBO] Slow FieldByName
Author Jason Wharton
In the TIBO... components for TDataset a person made it so that FieldByName
started the scan if fields with the next field from the last one found
instead of the first field. This made it more quick for people doing
FieldByName that corresponded with the numerical order of the fields.

What I recommend people always do if possible is to do FieldByName outside
of the loop and store aside the direct object reference in a local variable
and make reference to it directly instead.

Jason Wharton
CPS - Mesa AZ

-- We may not have it all together --
-- But together we have it all --

----- Original Message -----
From: "Helton de Oliveira" <helton_o@...>
To: <>
Sent: Monday, August 19, 2002 9:23 AM
Subject: [IBO] Slow FieldByName

> Hi,
> I need to get a field value by it's name. When i use a TIBOQuery, it took
> average of 30 miliseconds to get the field value of 10000 records with the
> following code:
> Value := FieldByName('SomeField').Value;
> If i use a TIB_Cursor, it gets an average of 300 miliseconds to do the
> About ten times more than the TIBOQuery with the same code !!
> Why the TIB_Cursor's FieldByName method is so slow ?
> Is there any other method of catching the field value by it's name other
> than FieldByName ? I already tried the FieldValue method with similar
> results...
> Thanks in advance,
> Helton