I'm having trouble on D2010 + ZEOSLIB_TESTING_REV800 + SQLITE-3.6.23.1.:
Very slowly post data in BLOB field (I write down images - 2 minutes write 1000Kb ):
Code: Select all
zq.SQL.Text := 'UPDATE pages SET name='''+LabeledEdit1.Text+''',';
ZQuery1.SQL.Add(pic = :pic ');
ZQuery1.SQL.Add(' WHERE id = ''' + PageID'''');
Stream := TFileStream.Create(FileName,fmOpenRead);
ZQuery1.ParamByName('model').LoadFromStream(Stream, ftGraphic);
ZQuery1.ExecSQL;
Stream.free;
Code: Select all
function NewEncodeString(Value: ansistring): ansistring;
var
I: Integer;
SrcLength, DestLength: Integer;
SrcBuffer, DestBuffer: PAnsiChar;
IH : integer;
begin
SrcLength := Length(Value);
SrcBuffer := PAnsiChar(Value);
DestLength := 2+ 2*SrcLength; // Hex-value double
SrcBuffer := PAnsiChar(Value);
result := '';
for I := 1 to SrcLength do
begin
IH := ord(SrcBuffer^);
result := result + IntToHex(IH,2);
Inc(SrcBuffer,1);
end;
result := 'x'+QuotedStr(result);
end;
Thx.
Evgeny.