[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Database Jpeg images

Posted on 1998-10-18
3
Medium Priority
?
268 Views
Last Modified: 2010-04-06
I need to know how to use jpegs in a database.
I want the jpegs to be stored in a separate directory, so I need the table to know which jpeg to open based on the other information stored within the database.
In other words When I click on the navigators next button it opens up the relevant Jpeg and so on.
Thanks in advance.
Mike Ross
0
Comment
Question by:mykyl
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 200 total points
ID: 1343290
Store the file name of the JPEG in the database table. When you move to a new record in the table with the navigator get the file name and load the JPEG image into an appropriate bitmap on the form.

If you want to store the JPEGs in the actual database table you can use BLOBs etc
0
 

Author Comment

by:mykyl
ID: 1343291
How do I do this. I need to know how to actually put this into practice.
Cheers
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1343292
Do it like this:

1. Place a TJPEGImage component on your form.
2. When you need to load an image (record changed...) do this

  var
    AStream : TFileStream;

.
  try
   AStream := TFileStream.Create(TheJPEGFileName, fmOpenRead);
   MyJPEGImage.LoadFromStream(AStream);
 finally
  AStream.Free;
end;

Cheers,

Raymond.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

873 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