Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Retrieving blob (image) from database

Posted on 2000-03-15
3
Medium Priority
?
202 Views
Last Modified: 2010-04-02
Hi,

I'm sending a picture to a database and storing it in an image column
StoredProc1->Params->Items[2]->LoadFromFile(EditAttach->Text,ftBlob);

where EditAttach is the path for the picture.
This all seems to work. However I don't know how to get this information back.
I'd like to have the name of the file or a simple notification (I can set up some kind of icon) to tell the user that a picture exists. He could then double-click on it...
But for now I'm more worried about getting the info back.
Any help would be greatly appreciated.
Thanks.
0
Comment
Question by:Your_Momma
[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
3 Comments
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2622297
Try the easy way. Use TDBImage to handle your graphics in the DB.
If a Datasource is linked to your table quParam and a TDBImage is linked to the
field BData of your table, your DBImage always shows the actual image. To port
it to a "normal" TImage just type

MyImage.Picture.Assign(MyDBmage.Picture);
I hope, it helps. Alex

0
 

Author Comment

by:Your_Momma
ID: 2623649

Sorry to reject this but this is not quite what I was looking for. Here are some more details that I should have mentioned.
The image is stored in a particular column of a table on my database. Depending on the unique key selected there may or may not be an image.

Therefore (maybe I misunderstand this part) if I associate Table1->TableName to the table on my database, I don't see how I can specifiy the column in which the image is stored.
I would like to associate the datasource by calling a stored procedure that is on my DB.

Thanks
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 200 total points
ID: 2633334
Hi. Do you have FishFact example of Borland, that makes
Link between TDBImage and TDBGrid ?
Method a bit different, that i prepose:
TDBImage and TDBGrid use same TDataSource object
(DataSource1) and during TDBGrid change line of table,
automatically TDBImage had been changed , too.
If no image in line, i prepose will be empty.
If you have't rthis example, i can send you it
(write you EMail).You can easy make same in your
project.
Alex

0

Featured Post

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.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

722 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