[SOLVED] Access violation Updating a Blob

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
tintinux
Junior Boarder
Junior Boarder
Posts: 43
Joined: 19.05.2010, 10:39

[SOLVED] Access violation Updating a Blob

Post by tintinux »

Hi

Using ZeosLib 7.2.1-rc with Lazarus 1.6, I have an access violation when I execute the UPDATE Query in the code below. Image is a TImage remaining empty. The field Test is a Blob.

Code: Select all

procedure PictureToParam(const aPicture: TPicture; const aParam: TParam);

var
  Stream: TStream;

begin
  Stream := TMemoryStream.Create;
  try
    aPicture.PixMap.SaveToStream(Stream);
    Stream.Position := 0;
    aParam.LoadFromStream(Stream, ftBlob);
  finally
    Stream.Free;
  end;
end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
  ZQuery.Sql.Text := 'UPDATE Testzeos SET Test := :Test ;' ;
  PictureToParam(Image.Picture, ZQuery.Params[0]);
  ZQuery.ExecSql;
  showmessage ('no error !');
end;    
There is no error with ZeosLib 7.1.4-stable.

I have attached a simple Lazarus program reproducing the issue, with a screen copy of the error message.

I don't know if it happens also with Delphi, but my code should be compatible after changing the extensions, (rename lpr in dpr, lfm in dfm)

Best regards
You do not have the required permissions to view the files attached to this post.
Last edited by tintinux on 22.02.2017, 08:26, edited 1 time in total.
tintinux
Junior Boarder
Junior Boarder
Posts: 43
Joined: 19.05.2010, 10:39

Re: Access violation Updating a Blob

Post by tintinux »

Hi

Is there any news about this issue ?

I'm unable to understand what is wrong and to find if it is specific to one environment.
I could now make a test with Delphi 2007, but may be this will not be very helpful....

Do you need more informations ?

Best regards
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1918
Joined: 17.01.2011, 14:17

Re: Access violation Updating a Blob

Post by marsupilami »

Hello tintinux,

nobody had the time yet to look into that bug. I will have a look after I fixed the bug, that I am working on currently. Creating a ticket on sourceforge will help us to not forget your bug reports. : o )

With best regards,

Jan
tintinux
Junior Boarder
Junior Boarder
Posts: 43
Joined: 19.05.2010, 10:39

Re: Access violation Updating a Blob

Post by tintinux »

As specified in the SF ticket, this is now solved.
Thanks again.
Post Reply