Recent

Author Topic: Store photo in dBF version 7  (Read 598 times)

1HuntnMan

  • Full Member
  • ***
  • Posts: 241
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Store photo in dBF version 7
« on: December 13, 2023, 05:42:26 pm »
I thought I might store pictures in a TdBF table so added a blob field to this table.  Problem is TdBF v7 evidently or guess it's Laz doesn't support it. It's in the table but the dbf blob component doesn't seem to be supported. I added a DBImage component to a form but attempting to link it to the dBase 7 field doesn't exist although I added the field to the table with My Dbf Studio. Any solution to this, thanks in advance!

wp

  • Hero Member
  • *****
  • Posts: 12275
Re: Store photo in dBF version 7
« Reply #1 on: December 13, 2023, 07:02:29 pm »
Find in the attachment a dbf version of the mushrooms demo application of Lazarus (in folder examples/database/image_mushrooms) that I wrote some time ago. The key point is that you should not use a TDBImage since it works only with a few specific image formats (bmp most probably). But when the image is displayed in a normal TImage component the streaming procedures of TBlobField are powerful enough to work for all registered image formats.

1HuntnMan

  • Full Member
  • ***
  • Posts: 241
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: Store photo in dBF version 7 [SOLVED]
« Reply #2 on: December 13, 2023, 09:38:34 pm »
Thanks WP, this will work!

 

TinyPortal © 2005-2018