mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 13:09:16 +02:00
* Patch from Lacak to support DECFLOAT(16) type. Fixes issue #41185
This commit is contained in:
parent
083a059043
commit
689a8f261f
@ -1288,9 +1288,7 @@ begin
|
||||
Move(i128, VSQLVar^.SQLData^, VSQLVar^.SQLLen);
|
||||
end;
|
||||
SQL_DEC16:
|
||||
begin
|
||||
// ToDo
|
||||
end;
|
||||
PQWord(VSQLVar^.SQLData)^ := BCDToDPDec64(AParam.AsFMTBCD);
|
||||
else
|
||||
if (VSQLVar^.sqltype <> SQL_NULL) then
|
||||
DatabaseErrorFmt(SUnsupportedParameter,[FieldTypeNames[AParam.DataType]],self);
|
||||
@ -1334,7 +1332,7 @@ begin
|
||||
// if VSQLVar^.AliasName <> FieldDef.Name then
|
||||
// DatabaseErrorFmt(SFieldNotFound,[FieldDef.Name],self);
|
||||
if assigned(VSQLVar^.SQLInd) and (VSQLVar^.SQLInd^ = -1) then
|
||||
result := false
|
||||
Result := False
|
||||
else
|
||||
begin
|
||||
|
||||
@ -1350,7 +1348,7 @@ begin
|
||||
VarCharLen := FieldDef.Size;
|
||||
end;
|
||||
|
||||
Result := true;
|
||||
Result := True;
|
||||
case FieldDef.DataType of
|
||||
ftBCD :
|
||||
begin
|
||||
@ -1370,8 +1368,9 @@ begin
|
||||
begin
|
||||
case (VSQLVar^.sqltype and not 1) of
|
||||
SQL_DEC16:
|
||||
// ToDo
|
||||
AFmtBcd := 0;
|
||||
AFmtBcd := DPDec64ToBcd(PQWord(CurrBuff)^);
|
||||
SQL_DEC34:
|
||||
Result := False; // Not implemented yet
|
||||
else
|
||||
case VSQLVar^.SQLLen of
|
||||
2 : AFmtBcd := BcdDivPower10(PSmallint(CurrBuff)^, -VSQLVar^.SQLScale);
|
||||
@ -1426,8 +1425,8 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
result := false;
|
||||
databaseerrorfmt(SUnsupportedFieldType, [Fieldtypenames[FieldDef.DataType], Self]);
|
||||
Result := False;
|
||||
DatabaseErrorFmt(SUnsupportedFieldType, [Fieldtypenames[FieldDef.DataType], Self]);
|
||||
end
|
||||
end; { case }
|
||||
end; { if/else }
|
||||
|
Loading…
Reference in New Issue
Block a user