Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need fast help storing image

Status
Not open for further replies.

GaryCowden

Instructor
May 9, 2001
5
0
0
US
Need fast help storing image

I am attempting to store a JPG image in an Access database. I have created a table with a field IMAGE, defined as OLE. When I run the following code:

Adodc1.Recordset.AddNew
Picture1.Picture = LoadPicture("c:\phone.jpg")
Adodc1.Recordset!Image = LoadPicture("c:\phone.jpg")
Adodc1.Recordset.Update

the image loads into the picture box but I get an error
-2147217887

I have also tried to display a picture from the nwind database using a simple bound control, that does not seem to work. what do I need to do to display an image that is store din an access table?

Thanks
 
It could be easyier to store the path to the image in a text field of the database. Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top