if not Table1.Exists then begin
  with Table1 do begin
    { The Table component must not be active }
    Active := False;  
    { First, describe the type of table and give }
    { it a name }
    DatabaseName := 'DBDEMOS';
    TableType := ttParadox;
    TableName := 'CustInfo';
    { Next, describe the fields in the table }
    with FieldDefs do begin
      Clear;
      with AddFieldDef do begin        Name := 'Field1';
        DataType := ftInteger;
        Required := True;
      end;
      with AddFieldDef do begin
        Name := 'Field2';
        DataType := ftString;
        Size := 30;
      end;
    end;
    { Next, describe any indexes }
    with IndexDefs do begin
      Clear;
      { The 1st index has no name because it is
      { a Paradox primary key }
      with AddIndexDef do begin        Name := '';
        Fields := 'Field1';
        Options := [ixPrimary];
      end;
      with AddIndexDef do begin
        Name := 'Fld2Indx';
        Fields := 'Field2';
        Options := [ixCaseInsensitive];
      end;
    end;
    { Call the CreateTable method to create the table }
    CreateTable;
  end;
end;

解决方案 »

  1.   

    请参考DATABASE DESKTOP 帮助文档中有关SQL语法的DML部分(CREATE TABLE),此SQL语法中数据类型定义有些古怪,不过还能用。可以生成大部分类型的数据库文件。FOXPRO我倒没试过,
    不过你除了拷文件就只有这办法了。 
      

  2.   

    据我所知,FOXPRO表要通过ODBC访问
    1。配置TDATABASE控件,是他和FOXPRO对应。
    2。通过TQUERY控件,发送SQL语句。
    如,建立一张表(ID CHAR ,VALUE INT)可以
    CREATE TABLE TEMP (ID CHAR(10),VALUE INT )
    具体的SQL定义请看相关的FOXPRO 帮助文件。