Recent

Author Topic: Error in the 64-bit version that does not occur in the 32-bit version -resolvido  (Read 780 times)

pereira

  • Newbie
  • Posts: 3
Hello... I've been in the Lazarus world for 1 year. I'm developing an application to generate payment receipts with Lazarus + firebird.
I have a blob-type "SIGNATURE" field in the database where I have an image of the record's signature.
In the Lazarus 32 Bit version it works normally with the code below:

// PROCEDURE THAT LOADS
   
[Try
      // Checks if the BLOB Image field contains valid data
      if not ZQuery_ReciboEmitente.FieldByName('Assinatura').IsNull then
      begin
        // Create a stream to read data from the BLOB field
         Stream := ZQuery_ReciboEmitente.CreateBlobStream(ZQuery_ReciboEmitente.FieldByName('Assinatura'), bmRead);
         BB_Confirma.Enabled  := True
      End;
   Except
      BB_Confirma.Enabled  := False;
   end;]


// PROCEDURE THAT SHOWS THE IMAGE

[   // Checks if the BLOB Image field contains valid data
   try
     // Load image from stream
      JPEGImage := TJPEGImage.Create;
      try
         JPEGImage.LoadFromStream(Stream);
         // Assign the image to the TQRImage component
         RLImage1.AutoSize:=True;
         RLImage1.Left:=240;
         RLImage1.Top:=290;
         RLImage1.Picture.Assign(JPEGImage);
      finally
         JPEGImage.Free;
      end;
   finally
      Stream.Free;
   end;        ]


In the 64-bit version it returns the following error:

close all lob streams before closing the resultset.


O problema estava na versão do Zeus -

« Last Edit: June 26, 2024, 03:52:43 pm by pereira »

jamie

  • Hero Member
  • *****
  • Posts: 6735
Re: Erro na versão 64 bits que não ocorre na versao 32 bits
« Reply #1 on: June 21, 2024, 11:04:37 pm »
Part of your code example is missing, because you didn't use CODE-TAGS.

use the little "#" you see above to encompass a block of code and paste back your code between the brackets.
The only true wisdom is knowing you know nothing

PascalDragon

  • Hero Member
  • *****
  • Posts: 5764
  • Compiler Developer
Re: Erro na versão 64 bits que não ocorre na versao 32 bits
« Reply #2 on: June 23, 2024, 04:52:47 pm »
First of, please use [code=pascal][/code] tags, so that the forum software does not try to interpret the code and it's better viewable.

Second, please only use English in the international part of the forum or at least provide an automatic translation inside your post.

 

TinyPortal © 2005-2018