From 2388575d3b10df75b3c86c9a504ba6b99f67e9b8 Mon Sep 17 00:00:00 2001 From: reiniero Date: Thu, 6 Mar 2014 18:16:47 +0000 Subject: [PATCH] fcl-db: export * dbf export: default table format DBaseIV, set default autorename for fields to true git-svn-id: trunk@26974 - --- packages/fcl-db/src/export/fpdbfexport.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/fcl-db/src/export/fpdbfexport.pp b/packages/fcl-db/src/export/fpdbfexport.pp index 29bf993d20..d0571ed65a 100644 --- a/packages/fcl-db/src/export/fpdbfexport.pp +++ b/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.