mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 18:30:18 +02:00
fcl-db: export
* dbf export: default table format DBaseIV, set default autorename for fields to true git-svn-id: trunk@26974 -
This commit is contained in:
parent
7f22ae17ff
commit
2388575d3b
@ -28,6 +28,7 @@ Type
|
|||||||
FTableFormat: TTableFormat;
|
FTableFormat: TTableFormat;
|
||||||
public
|
public
|
||||||
Procedure Assign(Source : TPersistent); override;
|
Procedure Assign(Source : TPersistent); override;
|
||||||
|
Procedure InitSettings; override;
|
||||||
Published
|
Published
|
||||||
Property TableFormat : TTableFormat Read FTableFormat Write FTableFormat;
|
Property TableFormat : TTableFormat Read FTableFormat Write FTableFormat;
|
||||||
Property AutoRenameFields : Boolean Read FAutoRename Write FAutoRename;
|
Property AutoRenameFields : Boolean Read FAutoRename Write FAutoRename;
|
||||||
@ -175,7 +176,7 @@ end;
|
|||||||
|
|
||||||
function TFPCustomDBFExport.CreateFormatSettings: TCustomExportFormatSettings;
|
function TFPCustomDBFExport.CreateFormatSettings: TCustomExportFormatSettings;
|
||||||
begin
|
begin
|
||||||
Result:=TDBFExportFormatSettings.Create(False);
|
Result:=TDBFExportFormatSettings.Create(True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFPCustomDBFExport.CreateExportFields: TExportFields;
|
function TFPCustomDBFExport.CreateExportFields: TExportFields;
|
||||||
@ -284,5 +285,12 @@ begin
|
|||||||
inherited Assign(Source);
|
inherited Assign(Source);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TDBFExportFormatSettings.InitSettings;
|
||||||
|
begin
|
||||||
|
inherited InitSettings;
|
||||||
|
FAutoRename:=true; // sensible to avoid duplicate table names
|
||||||
|
FTableFormat:=tfDBaseIV; //often used
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user