Solved

Saving Image to DBF table.

Posted on 2002-06-26
8
516 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
Technology Partners: 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

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!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

734 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