AH ok, I kinda thought that WAS the case, but was a little unsure.

Thanks,

Jeremy Coulter 
Application Developer

Application Development Centre
Compaq Computer New Zealand Ltd.

Phone:          64 3 371 5724 (DD)
Fax:                    64 3 371 5744
Cell:                    021 2150435
E-mail:              [EMAIL PROTECTED]
Private E-Mail:  [EMAIL PROTECTED]
 <<Jeremy Coulter.vcf>> 
> -----Original Message-----
> From: Myles Penlington [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 06, 1999 09:13
> To:   Multiple recipients of list delphi
> Subject:      RE: [DUG]:   FieldByName
> 
> The TDataset keeps an array of TFields. The fieldbyName does a linear
> search of this array for a field of the specified name.
> 
> FieldByName returns a TField. If you look at TField - AsString etc is a
> property with read and write methods.
> 
> To get the correct behaviour for each of the different field types, the
> getter and setter methods for each property is virtual, so that
> descendants of TField can implement the correct behaviour eg
> TNumericField, TStringField etc.
> 
> Myles.
> 
> 
>       -----Original Message-----
>       From:   Jeremy Coulter [SMTP:[EMAIL PROTECTED]]
>       Sent:   Tuesday, July 06, 1999 8:28 AM
>       To:     Multiple recipients of list delphi
>       Subject:        [DUG]:   FieldByName
> 
>       HI all.
> 
>       I was wondering if anyone could explain how FieldByName works.
> 
>       By that I mean HOW it works, i.e. how you can set data with it, i.e.
> fieldbyname('name').asstring:='joe'; AND you can get data from it, i.e.
> fieldbyname('Name').asstring.
>       So how do you create a property with this type of functionality ?
> 
>       I would like to be able to include similar functionality into one of
> my components I am working on at the moment.
> 
>       I had a look in the DB.pas file, but was none the wiser.
> 
>       Can anyone explain ?
> 
>       Thanks, Jeremy Coulter

Jeremy Coulter.vcf

Reply via email to