?
Solved

How to use Tdbimage?

Posted on 2003-03-03
6
Medium Priority
?
321 Views
Last Modified: 2010-05-18
Hello!
 I'm trying to use tdbimage to take bitmap images from a database file (Access). In that database file, I've got a table name 'Info' in which I have a field 'Image' which contains 'OLE Object' to store bitmap pictures. Then I use a TDBImage in my application to show the pictures in the database. But when I change the 'datafield' value of TDBImage to 'Image', I've got a error message 'Image bitmap incorrect'. How can I solve the problem? Thanks
0
Comment
Question by:tanhnhi
6 Comments
 
LVL 9

Expert Comment

by:mocarts
ID: 8056332
I think reason is simple - OLE Object is not the same as Image. You should use OLE Container (using its LoadFromStream method) to display your OLE object.

examp:
var
 s: TStream;
begin
 Query1.SQL.Text := "..."
 Query1.Open;
 s := Query1.CreateBlobStream(Query1.FieldByName('img'), bmRead);
 try
   OLE1.LoadFromStream(s);
 finally
   s.Free;  // must free stream
 end;
end;

I don't see the way to use TDBImage with Access datatypes :(

wbr, mo.
0
 
LVL 1

Expert Comment

by:venks
ID: 8058870
Use  Graphic type field in paradox.It works fine for me
venks
0
 
LVL 9

Expert Comment

by:mocarts
ID: 8063983
How you store these bitmaps in your table? by using access frontend? if so - I think, there will be incompatible formats. you can use Acccess OLE Object field as BLOB field in your Delphi app, but you can't get those objects in Delphi if you didn't saved them in your table with Delphi's SaveToStream.
mo.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:CleanupPing
ID: 9316975
tanhnhi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 9999631
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

PAQ'd and pts refunded

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer

P.S.
  I have no clue of this one, so experts please suggest.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10029544
PAQed, with points refunded (50)

Computer101
E-E Admin
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

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…
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…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

621 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