Subject RE: [IBO] TFieldefs
Author Gerhardus Geldenhuis
Is the question to ot or does'nt anybody know.

If it is to ot sorry about the post I will post it
somwhere else.

Groete
Gerhardus

> -----Original Message-----
> From: Gerhardus Geldenhuis [mailto:linuxmail@...]
> Sent: 09 July 2001 11:32
> To: IBObjects@yahoogroups.com
> Subject: [IBO] TFieldefs
>
>
> Hi
> How do I know to what type of variant a fieldtype will be cast.
> If you cast it like the code underneath it only cast the fields
> that have values. The fields that dont have values stay null.
> I am asking because this is part of a SaveDatasetToFile class. I dont
> want to save the structure of a record for each one, only for the
> first one.
>
> Thanks
> Gerhardus
>
> function CFD: String;
> var
> I: Word;
> begin
> for I:= 0 to Form1.IBOQuery1.FieldDefs.Count-1 do
> Result:=Result+Form1.IBOQuery1.FieldDefs[I].Name+';';
> Delete(Result,Length(Result),1);
> end;
>
> procedure adddata(ss:TDataset);
> begin
> v:=ss[cfd];
> end;
>
> procedure TForm1.Button2Click(Sender: TObject);
> var
> i:integer;
> begin
> v:=VarArrayCreate([0,IBOQuery1.FieldDefs.Count],varvariant);
> adddata(IBOQuery1);
> for i:=VarArrayLowBound(v,1) to VarArrayHighBound(v,1) do
> Memo1.Lines.Add(IBOQuery1.FieldDefs[i].FieldClass.ClassName+'
> '+ReturnVariantTypeDescription(v[I]));
>
> end;
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>