Solved

Saving Image to DBF table.

Posted on 2002-06-26
8
515 Views
Last Modified: 2011-09-20
I placed 'DBIMAGE'component on my form which connect to DataSource and Datafield and using popup menu I load image from my ClipBoard with follow lines of code in runtime.
        Table1.Open;
        DBImage1.PasteFromClipboard;
But I failed to save that image to my DBF table which got MEMO field inside.
Can anybody help me to save a image to my DBF table(memo field) from my form.

        Table1.Open;
        Table1.Edit;  
        DBImage1.PasteFromClipboard;
        Table1.Post;
If I try to put Edit and Post to above code its giving "Stream Read Error"..

Please help me asap. Thank you.
0
Comment
Question by:VENKAT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 7112747
MEMO fields are only for text.

If you want to save images, use a BLOB field.
0
 
LVL 1

Author Comment

by:VENKAT
ID: 7112898
Can you tell me how to use/create BLOB field. Actually I dont know what is BLOB field. Can u please help me clearly. Thank you.
0
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 20 total points
ID: 7112922
since you are using .dbf files, I assume you are using DBase?

Whether or not you can use BLOB fields depends on which dBase version your table is. If you are using a dBase IV table, then you are out of luck.

In dBase for Windows, there is a field type called Binary. To get more info on BLOBs, check out the Delphi help file.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:SBSen
ID: 7113114
Hi,
 if u have Dbase IV or Paradox then use Deliphi menu Tools -> database desktop to create the table.

HTH ;)
Senthil Kumar.
0
 
LVL 3

Expert Comment

by:VSF
ID: 7113358
When working with images and databases I allways use to save on the database only the path where the image file is located on my HD, this ensures that my database wont grow too much, and wont get corrupt so often.

Follow this link and download a demo:
www.victory.hpg.com.br/Samples/ParadoxAndImages.zip

Hope it helps!
VSF
www.victory.hpg.com.br 
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7113550
I agree with VSF about storing the actual image files outside the database.

BTW...BLOB = Binary Large OBject
0
 
LVL 3

Expert Comment

by:VSF
ID: 7116743
Far more safe!

VSF
0
 
LVL 1

Author Comment

by:VENKAT
ID: 7121156
your comments helped me to find a way to solve my things.Thank u.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question