|
@@ -1288,9 +1288,7 @@ begin
|
|
Move(i128, VSQLVar^.SQLData^, VSQLVar^.SQLLen);
|
|
Move(i128, VSQLVar^.SQLData^, VSQLVar^.SQLLen);
|
|
end;
|
|
end;
|
|
SQL_DEC16:
|
|
SQL_DEC16:
|
|
- begin
|
|
|
|
- // ToDo
|
|
|
|
- end;
|
|
|
|
|
|
+ PQWord(VSQLVar^.SQLData)^ := BCDToDPDec64(AParam.AsFMTBCD);
|
|
else
|
|
else
|
|
if (VSQLVar^.sqltype <> SQL_NULL) then
|
|
if (VSQLVar^.sqltype <> SQL_NULL) then
|
|
DatabaseErrorFmt(SUnsupportedParameter,[FieldTypeNames[AParam.DataType]],self);
|
|
DatabaseErrorFmt(SUnsupportedParameter,[FieldTypeNames[AParam.DataType]],self);
|
|
@@ -1334,7 +1332,7 @@ begin
|
|
// if VSQLVar^.AliasName <> FieldDef.Name then
|
|
// if VSQLVar^.AliasName <> FieldDef.Name then
|
|
// DatabaseErrorFmt(SFieldNotFound,[FieldDef.Name],self);
|
|
// DatabaseErrorFmt(SFieldNotFound,[FieldDef.Name],self);
|
|
if assigned(VSQLVar^.SQLInd) and (VSQLVar^.SQLInd^ = -1) then
|
|
if assigned(VSQLVar^.SQLInd) and (VSQLVar^.SQLInd^ = -1) then
|
|
- result := false
|
|
|
|
|
|
+ Result := False
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
|
|
|
|
@@ -1350,7 +1348,7 @@ begin
|
|
VarCharLen := FieldDef.Size;
|
|
VarCharLen := FieldDef.Size;
|
|
end;
|
|
end;
|
|
|
|
|
|
- Result := true;
|
|
|
|
|
|
+ Result := True;
|
|
case FieldDef.DataType of
|
|
case FieldDef.DataType of
|
|
ftBCD :
|
|
ftBCD :
|
|
begin
|
|
begin
|
|
@@ -1370,8 +1368,9 @@ begin
|
|
begin
|
|
begin
|
|
case (VSQLVar^.sqltype and not 1) of
|
|
case (VSQLVar^.sqltype and not 1) of
|
|
SQL_DEC16:
|
|
SQL_DEC16:
|
|
- // ToDo
|
|
|
|
- AFmtBcd := 0;
|
|
|
|
|
|
+ AFmtBcd := DPDec64ToBcd(PQWord(CurrBuff)^);
|
|
|
|
+ SQL_DEC34:
|
|
|
|
+ Result := False; // Not implemented yet
|
|
else
|
|
else
|
|
case VSQLVar^.SQLLen of
|
|
case VSQLVar^.SQLLen of
|
|
2 : AFmtBcd := BcdDivPower10(PSmallint(CurrBuff)^, -VSQLVar^.SQLScale);
|
|
2 : AFmtBcd := BcdDivPower10(PSmallint(CurrBuff)^, -VSQLVar^.SQLScale);
|
|
@@ -1426,8 +1425,8 @@ begin
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
- result := false;
|
|
|
|
- databaseerrorfmt(SUnsupportedFieldType, [Fieldtypenames[FieldDef.DataType], Self]);
|
|
|
|
|
|
+ Result := False;
|
|
|
|
+ DatabaseErrorFmt(SUnsupportedFieldType, [Fieldtypenames[FieldDef.DataType], Self]);
|
|
end
|
|
end
|
|
end; { case }
|
|
end; { case }
|
|
end; { if/else }
|
|
end; { if/else }
|