Jump to content

Behdadsoft

Members
  • Content Count

    6
  • Joined

  • Last visited

Posts posted by Behdadsoft


  1. Hi. 

    I added many images into Access Database as binary. Now I want to load them form database and put in TImage.

    I wrote code below but it doesn't work and give me an error (Attached). 

    I compound my code with this example: Streaming Bitmaps and other Binary Data to BLOB Fields

    procedure LoadImageFromBinary;
      var
       Image : TJpegImage;
       Stream: TStream;
       query : string;
       Blobfield: TField;
    Begin
         query := 'Select JPEG From Table Where Name=MyName';
         Try
            Image := TJpegImage.Create;
             With ADOQuery do
                Begin
                  Try
                     SQL.Clear;
                     SQL.Add(query);
                     Open;
                     Blobfield := FieldbyName('JPEG');
                     Stream := CreateBlobStream(Blobfield,bmReadWrite);
                     Image.LoadFromStream(Stream);
                     TImage1.Picture.Assign(Image);
                  Finally
                     Close;
                  End;
             End;
         Finally
            Stream.Free;
            Image.Free;
         End;
    End;

     

    00.png


  2. 21 minutes ago, Attila Kovacs said:

    What makes you think the "other" is the normal? For me, it's abnormal.

    :classic_mellow:

     

    If you select a row in DBGrid and with moving scrollbar selected row changes it's normal? it should only scroll page to up or down and not change selection. Something that happens in C# and other.


  3. Hi.

    I have a DBGrid on my form that contain many rows. the problem is that, scrollbar don't work normally like other programming language. I searched in google for find a solution for this issue but I couldn't find anything. for better understanding, I captured a video from C# DataGridView and Delphi DBGrid that the problem is obvious.
    Also I Use Delphi 11.1.

     

    Video: Compare C# and Delphi Scrollbar

×