Subject Re: [IBO] Iterating Fields in IBO Dataset
Author Luiz
I would look at findfield method of tibointernaldataset.

Luiz.
----- Original Message -----
From: "Ross C.Williams" <ross@...>
Newsgroups: egroups.ibobjects
To: <IBObjects@yahoogroups.com>
Sent: Sunday, March 30, 2003 12:32 PM
Subject: [IBO] Iterating Fields in IBO Dataset


> How do you iterate through fields (columns?) in a dataset?
>
> I want to test whether a field with a particular name exists in the
> dataset. With the BDE I would do this by something like:
>
> function FieldExists(DataSet: TDataSet; const Field: string): Boolean;
> var
> i: integer;
> begin
> result := False;
> for i := 0 to (DataSet.fieldDefs.count - 1) do
> begin
> if DataSet.FieldDefs.Items[i].Name = Field then
> begin
> result := True;
> break; //ends iteration since named field was found
> end
> else
> begin
> Result := dsFieldExists(DataSet, Field);
> // Calculated or Lookup field exists
> end;
> end;
> end;
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>