mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 10:49:07 +02:00
* Use TField.Assignvalue to set the fieldvalues in DoInsertAppend
git-svn-id: trunk@12262 -
This commit is contained in:
parent
bd36bdc577
commit
b0cf2a2dc6
@ -880,21 +880,7 @@ begin
|
||||
Insert;
|
||||
|
||||
for i := 0 to ValuesSize-1 do with values[i] do
|
||||
case VType of
|
||||
vtInteger : fields[i].AsInteger := VInteger;
|
||||
vtBoolean : fields[i].AsBoolean := VBoolean;
|
||||
vtChar : fields[i].AsString := VChar;
|
||||
vtWideChar : fields[i].AsString := VWideChar;
|
||||
vtString : fields[i].AsString := AnsiString(VString);
|
||||
vtAnsiString: fields[i].AsString := AnsiString(VAnsiString);
|
||||
vtCurrency : fields[i].AsCurrency := VCurrency^;
|
||||
// vtWideString: fields[i].AsWideString := VWideString;
|
||||
vtInt64 : fields[i].AsLargeInt := VInt64^;
|
||||
vtQWord : fields[i].AsLargeInt := VQWord^;
|
||||
vtVariant : fields[i].AsVariant := VVariant^;
|
||||
else
|
||||
DatabaseError(SIncompatibleTVarRec);
|
||||
end; {case}
|
||||
fields[i].AssignValue(values[i]);
|
||||
Post;
|
||||
|
||||
end;
|
||||
|
@ -44,7 +44,6 @@ Resourcestring
|
||||
STransNotActive = 'Operation cannot be performed on an inactive transaction';
|
||||
STransActive = 'Operation cannot be performed on an active transaction';
|
||||
SFieldNotFound = 'Field not found : "%s"';
|
||||
SIncompatibleTVarRec = 'Faild to assign one of the TVarRec values into a TField';
|
||||
SInactiveDataset = 'Operation cannot be performed on an inactive dataset';
|
||||
SInvalidDisplayValues = '"%s" are not valid boolean displayvalues';
|
||||
SInvalidFieldKind = '%s : invalid field kind : ';
|
||||
|
@ -369,7 +369,7 @@ begin
|
||||
vtWideString:
|
||||
AsWideString := WideString(VWideString);
|
||||
vtInt64:
|
||||
Self.Value := VInt64^;
|
||||
AsLargeInt := VInt64^;
|
||||
else
|
||||
Error;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user