AllExperts > Delphi 
Search      
Delphi
Volunteer
Answers to thousands of questions
 Home · More Delphi Questions · Answer Library  · Encyclopedia ·
More Delphi Answers
Question Library

Ask a question about Delphi
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Krisztián Pintér
Expertise
I`m good at database design and programming, using windows API, multithreaded programming, inter-process commucitations, dll-s and packages. I`m experienced with OLAP and SQL. I also have some COM/ActiveX knowledge and component writing skills. Weak sides: internet, multimedia, graphics. Please don`t ask questions that can be easily looked up in the reference manual, or requires hours of debugging, what appears to be your task. Conceptional or methodological questions are the most welcome ones.

Experience
I have 8+ years work experience with Delphi. My primary area is Information Systems Programming. With a small team, we designed and implemented large scale Information Systems to pharmaceutical factories and parking companies.
 
   

You are here:  Experts > Computing/Technology > Delphi Programming > Delphi > Load and Saving DB Jpeg Images

Delphi - Load and Saving DB Jpeg Images


Expert: Krisztián Pintér - 10/3/2009

Question
Hi,

I am using BCB6 & Flashfiler 2, but any advice from Delphi may help.

How can i post and load jpeg images in a database. Any suggestion, trick and third party component would help.

Thanks in advance

Answer
hello,

you need a blob field. i don't know the flashfiler platform, but most databases support some long binary or blob or other data type that can hold any arbitary binary data.

in delphi, there is a field type TBlobField to handle such fields. probably the easiest way to work with them are the LoadFromStream and SaveToStream methods. if you want to add image from file, there are LoadFromFile too (and SaveToFile as well).

if you want to show the image on the screen, you will need a TImage, you will need to add Jpeg unit to your project or form's uses section. Once it done, you can SaveToStream to a memory stream, and then LoadFromStream into the TImage.

regards,
K

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.