Re: how to show that there is a detail record
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Mon, 29 May 2006 18:38:57 -0500
Thank you, very helpful, but how can I do this during run time? Because
I/the user can use slightly different databases. I read the commandtext
from an ini-file when the program opens the database.
Thank you very much
You can write code like this to add persistent fields and a calculated field
var
f : TField;
i : integer;
begin
Query1.FieldDefs.Update
Query1.Close;
for i := 0 to Query1.FieldDefs.Count - 1 do
//create persistent field that do not exist
if Query1.FindField(Query1.FieldDefs[i].Name) = nil then
Query1.FieldDefs.Items[i].CreateField(Query1);
//create a calculated field
f := TStringField.Create(Query1);
f.Name := 'Query1CalcField';
f.FieldName := 'CalcField';
f.DisplayLabel := 'CalcField';
f.Calculated := True;
f.DataSet := Query1;
Query1.Open;
end;
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- References:
- how to show that there is a detail record
- From: Detlef Ross
- Re: how to show that there is a detail record
- From: Brian Bushay TeamB
- Re: how to show that there is a detail record
- From: Detlef Ross
- Re: how to show that there is a detail record
- From: Brian Bushay TeamB
- Re: how to show that there is a detail record
- From: Detlef Ross
- Re: how to show that there is a detail record
- From: Brian Bushay TeamB
- Re: how to show that there is a detail record
- From: Detlef Ross
- how to show that there is a detail record
- Prev by Date: Re: how to show that there is a detail record
- Next by Date: Re: how to show that there is a detail record
- Previous by thread: Re: how to show that there is a detail record
- Next by thread: Re: how to show that there is a detail record
- Index(es):
Relevant Pages
|