fcl-db: dbase: add new field types (ftLongWord, ftShortint, ftByte) to fix export test errors

git-svn-id: trunk@47225 -
This commit is contained in:
lacak 2020-10-27 15:01:57 +00:00
parent 6c2554af69
commit eb4bc9d153
2 changed files with 18 additions and 0 deletions

View File

@ -223,6 +223,7 @@
{$define SUPPORT_SEPARATE_VARIANTS_UNIT} {$define SUPPORT_SEPARATE_VARIANTS_UNIT}
{$define SUPPORT_REFRESHEVENTS} {$define SUPPORT_REFRESHEVENTS}
{$define SUPPORT_BACKWARD_FIELDDATA} {$define SUPPORT_BACKWARD_FIELDDATA}
{$define SUPPORT_LONGWORD}
// FPC 1.0.x exceptions: no 0/0 support // FPC 1.0.x exceptions: no 0/0 support
{$ifdef VER1_0} {$ifdef VER1_0}

View File

@ -177,6 +177,7 @@ database.
DIGITS_WORD = 5; DIGITS_WORD = 5;
DIGITS_INTEGER = 9; DIGITS_INTEGER = 9;
DIGITS_LARGEINT = 18; DIGITS_LARGEINT = 18;
DIGITS_LONGWORD = 9;
//==================================================================== //====================================================================
// DbfFieldDefs // DbfFieldDefs
@ -474,6 +475,9 @@ begin
ftFloat, ftSmallInt, ftWord ftFloat, ftSmallInt, ftWord
{$ifdef SUPPORT_INT64} {$ifdef SUPPORT_INT64}
, ftLargeInt , ftLargeInt
{$endif}
{$ifdef SUPPORT_LONGWORD}
, ftLongWord, ftShortInt, ftByte
{$endif} {$endif}
: :
FNativeFieldType := 'N'; //numerical FNativeFieldType := 'N'; //numerical
@ -559,6 +563,19 @@ begin
FSize := DIGITS_LARGEINT; FSize := DIGITS_LARGEINT;
FPrecision := 0; FPrecision := 0;
end; end;
{$endif}
{$ifdef SUPPORT_LONGWORD}
ftLongWord:
begin
FSize := DIGITS_LONGWORD;
FPrecision := 0;
end;
ftShortInt,
ftByte:
begin
FSize := 3;
FPrecision := 0;
end;
{$endif} {$endif}
ftString {$ifdef SUPPORT_FIELDTYPES_V4}, ftFixedChar, ftWideString{$endif}: ftString {$ifdef SUPPORT_FIELDTYPES_V4}, ftFixedChar, ftWideString{$endif}:
begin begin