Create an table, copying the structure of an existing one  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 19/07/99

Tip accessed 708 times

 



 var
  Table2  : TTable;
 begin
  Table1.FieldDefs.Update;
  Table1.IndexDefs.Update;
  Table2 := TTable.Create(nil);
  Table2.DatabaseName := Table1.DatabaseName;
  Table2.TableName := 'NewTable';
  Table2.TableType := Table1.TableType;
  Table2.FieldDefs.Assign(Table1.FieldDefs);
  Table2.IndexDefs.Assign(Table1.IndexDefs);
  Table2.CreateTable ;
 end;