Board index » delphi » Lookup and Calculated fields in dynamic fields

Lookup and Calculated fields in dynamic fields

Hi,

would it be possible, to define lookup or calculated fields with dynamic fields in Delphi 4?

Thanx Paul

 

Re:Lookup and Calculated fields in dynamic fields


Quote
>would it be possible, to define lookup or calculated fields with dynamic fields in Delphi 4?

Do you mean create these fields in code?  that you can do.

here is some sample code

Table1.Active:=false; // Must be false to add Fields to the Dataset
  Table1.FieldDefs.Update; // Make sure we have the latest Fields

  Monthly:=TFloatField.Create(Table1);
  Monthly.FieldName:='Monthly Salary';
  Monthly.Calculated:=true;
  Monthly.Dataset:=Table1;
  Monthly.DisplayFormat:='$#,0.00';

  Table1.Active:=true;

--
Brian Bushay (TeamB)
Bbus...@DataGuidance.com

Other Threads