* Use TField.Assignvalue to set the fieldvalues in DoInsertAppend

git-svn-id: trunk@12262 -
This commit is contained in:
joost 2008-11-29 09:13:10 +00:00
parent bd36bdc577
commit b0cf2a2dc6
3 changed files with 2 additions and 17 deletions

View File

@ -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;

View File

@ -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 : ';

View File

@ -369,7 +369,7 @@ begin
vtWideString:
AsWideString := WideString(VWideString);
vtInt64:
Self.Value := VInt64^;
AsLargeInt := VInt64^;
else
Error;
end;