要在运行中,建立Paradox数据库,如何实现,最好有代码

解决方案 »

  1.   

    if not DirectoryExists('C:\XXXXX') then
           ForceDirectories('C:\XXXXX');  if not FileExists('C:\XXXXX\DataIndex.db') then
        begin
          Table3 := Tquery.create(self);
          with Table3 do
            begin
              with sql do
                begin
                   clear;
                   add('create table "'+ 'C:\XXXXX\DataIndex.db"');
                   add('(CZRsj char(14),');      //  加入时间
                   add('SHbh char(24),');        //  编号
                   add('QK char(24),');          //  欠款
                   add('CZRID Char(10),' );      //  操作人编号
                   Add('FIndex int)');
                 end;
              execsql;
              sql.clear;
              sql.add('create index CZRID on "C:\XXXXX\DataIndex.db" (CZRID)');
              execsql;
            end;
          Table3.CLose;
          Table3.Free;
        end;