Solved

Saving Image to DBF table.

Posted on 2002-06-26
8
511 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 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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