Home | 10% - Off! | New | VCL | DB-Aware | Tools | DB Tools | Apps | Samples | .NET | .NET DB-Aware | .NET Tools | .NET Samples | Kylix | Docs | Bold | Discussion | Sites | Tips | DPFL | Authors | Uploads | RSS | Store | Advertisement | About
DPFL

Information
Introduction
Rules
Advertisement
Categories
Graphics
System
Forms
Windows
Databases
Math routines
Internet
Units/Libraries
RGB2HLS
DzURL
Delphi Procedures and Function Library > Categories > Databases

Click and process to the routine implementation...
BoAutoCreateTFields() BoClearAllTFields() DBEdit1KeyUp()

Author Target Keywords Description
Benny Otten (Belgium) webmaster@fadel.com, www.fadel.com Win32 Database, TFields, Calculatedfields Create TFIELD objects runtime: Automatically generate TField objects for a given datase. No need to use the field editor at designtime! Example: BoAutoCreateTFields(Table1); BoCreateTField(Table1, TIntegerField, 'CalculatedTotal', 0, true) Creates all TFields for dataset and adds a calculated field.
procedure BoAutoCreateTFields( Yourdataset : TDataSet );
var
  TmpField  : TField;
  i         : Integer;
begin
  Yourdataset.Fielddefs.Update;
  for i:= 0 to Pred(YourDataset.FieldDefs.count) do
  begin
    TmpField := Yourdataset.FindField( Yourdataset.
                                   FieldDefs[i].Name );
    if Not assigned(TmpField) then
    begin
      TmpField := Yourdataset.FieldDefs[i].
                                   CreateField( Yourdataset.Owner );
      TmpField.name := YourDataset.name + 
                                   Yourdataset.FieldDefs[i].Name;
    end;
  end;
end;
Author Target Keywords Description
Benny Otten (Belgium) webmaster@fadel.com, www.fadel.com Win32 Database, TFields, Calculatedfields Clear all TFIELD objects from a dataset
procedure BoClearAllTFields ( YourDataSet : TDataSet );
begin
  while (YourDataSet.FieldCount <> 0) do
    YourDataSet.Fields[0].Free;
end;
Author Target Keywords Description
Wouter van Wegen D5 ADO,Live-Time,Update Livetime update grid while typing in DBEditbox
procedure TForm1.DBEdit1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
 DBEdit1.DataSource.Edit;
 DBEdit1.Field.AsString:=DBEdit1.Text;
end;


Advertising on Torry's Delphi Pages

Quick Search
Exact phrase
Title
Description

Useful Books

Advertising on Torry's Delphi Pages

Visit Our Delphi Site.

Up | Home | 10% - Off! | New | VCL | DB-Aware | Tools | DB Tools | Apps | Samples | .NET | .NET DB-Aware | .NET Tools | .NET Samples | Kylix | Docs | Bold | Discussion | Sites | Tips | DPFL | Authors | Uploads | RSS | Store | Advertisement | About
Copyright © Torry's Delphi Pages Torry's Delphi Pages Maintained by A. Berman. Notes? Comments? Feel free to send... Copyright © 1996-2002
All trademarks are the sole property of their respective owners
Do not click! Special anti-spammer page!