last weekend we migrated from Sybase 12.5.4 to Sybase 15.7 and we began to experience some problems with Image fields.
In Sybase 12.5.4 this Code Worked fine to load Blobs(JPG images):
Code: Select all
TImagenes.FieldByName('Orden').AsInteger := TImagenes.RecordCount + 1;
TImagenesGraph.LoadFromStream(corriente);
TImagenes.FieldByName('EnBD').AsBoolean := false;
TImagenes.Post;
TImagenes.First;
When the execution reaches the Post is hangs with no error, even no timeout after 10 minutes. We have tried other components:
TUniQuey: Hangs when calling Execute.
TUniSQL: It does not hang, but doesn't insert the line.
Small code to replicate in XE6:
Code: Select all
// 'CREATE TABLE TempFotos ( Graph text, Orden Int, EnBD bit )'
try
with UniQuery1 do
begin
ParamByName('Orden').AsInteger := 1;
ParamByName('Graph').LoadFromFile('C:\Users\916278\Pictures\belen.JPG', ftBlob);
ParamByName('EnBD').AsBoolean := false;
Execute;
end;
MessageDlg('Se ha insertado correctamente', mtInformation, [mbOK], 0);
except
on e: Exception do
begin
ShowMessage(e.message);
end;
end;
Delphi 6, XE6
Sybase 15.7
UniDAC 6.0.1
Do I have to activate any connection option to insert blobs on Sybase 15.7?
Thanks