One of our testcases is complaining when updating a memo in Firebird-2.5.4.26856-0_x64 UTF8, Dialect 3. The memo is defined as 'BLOB SUB_TYPE 1 SEGMENT SIZE 80'. The connection is defined with the specificoptions as specified below. I'm overlooking something obvious, but what?
connection.specificoptions
Code: Select all
InterBase.CharSet=UTF8
'InterBase.UseUnicode=True
InterBase.Protocol=TCP
InterBase.SQLDialect=3
Code: Select all
var AStringStream: TStringStream;
AQuery: TUniQuery;
begin
AQuery := TUniQuery.Create(nil);
AStringStream := TStringStream.Create;
try
//Some rubbisch string > 65k with unicode
while AStringStream.Size < 256000 do begin
AStringStream.WriteString('Documents can contain non ASCII characters, like Norwegian æ ø å , or French ê è é');
end;
AQuery.Connection := MyConnection;
AQuery.Sql.Add('update image set memo=:memo where image=:image');
AQuery.ParamByName('memo').AsMemo := AStringStream.DataString;
AQuery.ParamByName('image').AsInteger := x; //a valid identifier
AQuery.ExecSQL;[b][u] //<-- Crashes here with 'malformed string'[/u][/b]
CheckEquals(....
finally
AStringStream.Free;
AQuery.Free;
end;
end;
Marius