瀏覽代碼

fcl-db: export
* dbf export: default table format DBaseIV, set default autorename for fields to true

git-svn-id: trunk@26974 -

reiniero 11 年之前
父節點
當前提交
2388575d3b
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      packages/fcl-db/src/export/fpdbfexport.pp

+ 9 - 1
packages/fcl-db/src/export/fpdbfexport.pp

@@ -28,6 +28,7 @@ Type
     FTableFormat: TTableFormat;
   public
     Procedure Assign(Source : TPersistent); override;
+    Procedure InitSettings; override;
   Published
     Property TableFormat : TTableFormat Read FTableFormat Write FTableFormat;
     Property AutoRenameFields : Boolean Read FAutoRename Write FAutoRename;
@@ -175,7 +176,7 @@ end;
 
 function TFPCustomDBFExport.CreateFormatSettings: TCustomExportFormatSettings;
 begin
-  Result:=TDBFExportFormatSettings.Create(False);
+  Result:=TDBFExportFormatSettings.Create(True);
 end;
 
 function TFPCustomDBFExport.CreateExportFields: TExportFields;
@@ -284,5 +285,12 @@ begin
   inherited Assign(Source);
 end;
 
+procedure TDBFExportFormatSettings.InitSettings;
+begin
+  inherited InitSettings;
+  FAutoRename:=true; // sensible to avoid duplicate table names
+  FTableFormat:=tfDBaseIV; //often used
+end;
+
 end.