Subject | Re: [IBO] Best approach |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2003-02-07T14:16:34Z |
Welcome Salvatore!
Normally, I simply use FieldByName, but if I have to process a number of
records I use "persistent fields" (that is, I declare a variable of type
TIB_Column and do
SensibleColumnName:=TIB_Cursor1.FieldByName('JustAField'); after
preparing). Works very well.
Occationally, if I'm only doing things ad hoc for someone asking for data I
even use Fields[FieldNumber]. The problem with that approach is that it
isn't very easy to read, so in theory I try to avoid using it if the
program does any more than a simple extraction of data.
HTH,
Set
At 14:25 07.02.2003 +0100, you wrote:
Normally, I simply use FieldByName, but if I have to process a number of
records I use "persistent fields" (that is, I declare a variable of type
TIB_Column and do
SensibleColumnName:=TIB_Cursor1.FieldByName('JustAField'); after
preparing). Works very well.
Occationally, if I'm only doing things ad hoc for someone asking for data I
even use Fields[FieldNumber]. The problem with that approach is that it
isn't very easy to read, so in theory I try to avoid using it if the
program does any more than a simple extraction of data.
HTH,
Set
At 14:25 07.02.2003 +0100, you wrote:
>hello all,
>
>I'm starting to learn IB Objects (Delphi 5.01, but very soon I'll
>upgrade to Delphi 7) and I'd like to know what is your preferred
>approach (or what is, in your opinion, the most suitable approach)
>when writing applications:
>
>a) Use persistent fields
>b) Use "FieldByName" method
>c) Use a mix of the above
>
>I'm planning to always use IB_... native objects.
>
>Regards
>Salvatore