?
Solved

How to use Tdbimage?

Posted on 2003-03-03
6
Medium Priority
?
320 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
[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
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
Independent Software Vendors: 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

Industry Leaders: 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!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

752 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