Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Saving Image to DBF table.

Posted on 2002-06-26
8
Medium Priority
?
526 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
  • 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 40 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 46

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

877 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