Issue #1 - Modifying a WideMemo field:
Code: Select all
qryText.SQL.Text := 'select * from text where id = 1';
qryText.Open;
qryText.FieldByName('text_val').AsWideString := '來電者是劫持';
qryText.Post;
Code: Select all
qryText.SQL.Text := 'update text set text_val = :newval where id = 1';
qryText.ParamByName('newval').DataType := ftWideMemo;
qryText.ParamByName('newval').AsWideString := '來電者是劫持';
qryText.Execute;
Issue #3 - Updating a WideMemo field with a stream:
Code: Select all
var
Buffer: string;
begin
Buffer := '來電者是劫持';
MemStream.Write(Pointer(Buffer)^, ByteLength(Buffer));
MemStream.Position := 0;
qryText.SQL.Text := 'select * from text where id = 1';
qryText.Open;
TBLOBField(qryText.FieldByName('text_val')).LoadFromStream(Stream);
qryText.Post;
end;