Hi everyone,
I'm having an issue with TBufDataset (which does not happen with TMemDataset), where all string fields are saved with invalid characters after posting the record. Some fields are saved correctly, others are not.
Tested using Lazarus 4.0.
I've attached both a code snippet and a sample project to reproduce the issue.
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
begin
i:= 0;
BufDataset1.Close;
BufDataset1.CreateDataset;
BufDataset1.Open;
repeat
if not BufDataset1.IsEmpty then
BufDataset1.Append;
BufDataset1.Edit;
BufDataset1.FieldByName('name').AsString:= 'Talis ' + IntToStr(i);
BufDataset1.FieldByName('lastname').AsString:= 'Gomes';
BufDataset1.Post;
inc(i)
until i > 5;
end;
In attachment image the error and test project
Any suggestions or tips would be greatly appreciated.
Very thanks
Talis