
Hi Again, I have the next problem, I have declared the next Structure:
StreamRecord = Record
IDE : array of String;
BLOB : array of TStream;
End;
private
ImgArray : StreamRecord;
Next I declared a procedure: This works when I try to obtain my Stream from by array and show it into a Image.
i := 0;
While Not SQLQuery1.EOF do
begin
if Not SQLQuery1PHOTO.IsNull then begin
i := i + 1;
SetLength(ImgArray.BLOB, i);
SetLength(ImgArray.IDE, i);
ImgArray.IDE[i-1] := SQLQuery1ID.Text ;
ImgArray.BLOB[i-1] := SQLQuery1.CreateBlobStream(SQLQuery1PHOTO, bmRead);
-> Image1.Picture.Graphic:= TJpegImage.Create;
-> Image1.Picture.Graphic.LoadFromStream(ImgArray.BLOB[i-1]);
Image1.Repaint;
end;
SQLQuery1.Next;
end;
Trx1.Commit;
SQLQuery1.Free;
Trx1.Free;
*****************************************************************
The problem is when i put the next code outside the loop, in this case a use 0 for test because I'm sure this have a value, the error is : "EInOutError with message File Not open"
-> Image1.Picture.Graphic:= TJpegImage.Create;
-> Image1.Picture.Graphic.LoadFromStream(ImgArray.BLOB[0]);
Where is my error, i need to set a position of my stream, why this works into the loop?