Link to home
Start Free TrialLog in
Avatar of graga
graga

asked on

ADO+Access2000+Images how to...

I am trying to display images (eg. bitmaps) stored in Access database, accessed from my Delphi Application using ADO.
1. I defined field in Access table as OLE Object and embedded bitmap in there.
2. I created ADO Table and put DBImage on it.
3. When I try to link to the image field in the table I get a message
'Bitmap Image is not valid'

I don't have much time to go through the books, therefore I offer 200 points.
I will need a step-by-step instructions.

Thanx.
Avatar of Epsylon
Epsylon

You can't use TDBImage when pictures are stored as OLE objects. Store pictures in a memo field instead.
Avatar of graga

ASKER

Epsylon,
I just created quickly data file with a single table, 2 fields, one memo.
I also have a very simple program that does the following:

ADOTable1.Append;
ADOTable1.FieldByName('Seq').AsInteger := 1;
ADOTable1.FieldByName('Picture').Assign(Image1.Picture);
ADOTable1.Post;

This does not work. I may need some more help please.
ASKER CERTIFIED SOLUTION
Avatar of Epsylon
Epsylon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of graga

ASKER

Epsylon,

You're a champion,

thanx