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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Long Binary Data

Status
Not open for further replies.

sopomeres

MIS
Jan 16, 2003
61
US
How can I view an image stored as Long Binary Data. I have a Photo ID App that stores the image as bitmap into an Access 2K DB. But when I go to open the image from within the db, I receive the following error message:

"A problem occurred while Microsoft Access was communicating with the OLE server or Active X control.
Close the OLS server and restart it outside of Microsoft Access. Then try the original operation gain in Microsoft Access."

Help!

Thank you.
Chuck

 
you might try creating a field in your table called Imagepath (populate it with the path - i.e. C:\Images\Image1.bmp - where each image is located on your server, network, etc), and then on your form include the Imagepath field and an image control.

then in the On Current property of your form include the following:

'Each time a new record is selected the image control should refresh.

Private Sub Form_Current()

Dim path

path = Me.Imagepath.Value

YourImageName.Picture = path

End Sub

hope this helps.

 
If you have to stick with Long Binary data in your table, the only way I know to make this work is to write the data to a temporary .bmp file, then load it into an image control. This is something like cghoga's solution, except that you write out the temporary file before assigning its name to the image control.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top