在Delphi中如何动态创建dbf数据库(一)?

table2.Close;
 table2.Active:=false;
 table2.Exclusive:=true;
 table2.TableName:='h:\gzkd\sds';
 table2.TableType:=ttFOXPRO;
   with table2.FieldDefs do
   begin
   clear;
   with addfielddef do
   begin
   name:='bh';
   datatype:=FTSTRING;
   size:=6;
     end;
      with addfielddef do
   begin
   name:='xm';
   datatype:=FTSTRING;
   size:=8;
     end;
      with addfielddef do
   begin
   name:='ms';
   datatype:=FTSTRING;
   size:=10;
     end;
       with addfielddef do
   begin
   name:='dw';
   datatype:=FTSTRING;
   size:=20;
    end;
    with addfielddef do
   begin
   name:='gzsr';
   datatype:=FTfloat;
   end;
    with addfielddef do
   begin
   name:='gwjt';
   datatype:=FTfloat;
   end;
    with addfielddef do
   begin
   name:='shbt';
   datatype:=FTfloat;
     end;
       with addfielddef do
   begin
   name:='qtsr';
   datatype:=FTfloat;
     end;
       with addfielddef do
   begin
   name:='srze';
   datatype:=FTfloat;
     end;
       with addfielddef do
   begin
   name:='jsze';
   datatype:=FTfloat;
     end;
       with addfielddef do
   begin
   name:='yjsds';
   datatype:=FTfloat;
     end;
       with addfielddef do
   begin
   name:='yijsds';
   datatype:=FTfloat;
     end;
       with addfielddef do
   begin
   name:='bjsds';
   datatype:=FTfloat;
     end;
       with addfielddef do
   begin
   name:='ny';
   datatype:=FTfloat;
     end;
   end;
   table2.CreateTabe;

 

你可能感兴趣的:(Delphi)