By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Advanced data binding using images

P: n/a
Hello,

Does anyone know how to bind the image property of a picture control to an
Access 2000 database OLE object column that contains a MS Photo Editor 3.0
photo? When I try binding the picture control image with the advanced
binding panel, my dataset shows the table with the column but it will not
set.

I read thru the MS Knowledge Base and the closest solution I could find was
article 317701. The example code reads an image "from file"; converts it to
a byte array; stores the byte array into a database table; reads back the
byte array from the table; converts it to a memory stream which is finally
converted to an image. It seems like you have to use code to first populate
the database with the images in order to read them properly. I want to use
an existing Access database that already has all the images stored. I
noticed that in the Pitfall section of the article it states:

"This test will not work with the Photo column in the Employees table of the
sample Northwind database distributed with Access and SQL Server. The bitmap
images stored in the Photo column are wrapped with the header information
created by the Visual Basic 6.0 OLE Container control"

I'm under the impression that you cannot bind to an OLE column in an Access
database where the images were first stored using Access. Is this correct or
am I missing something?

By the way, there error I get using the example code is "Invalid parameter
used" when executing Image.FromStream(strBlobData). Of course, I did not
save the image using the example code. I only used the code that reads the
image.

Thanks in advance.

Frank
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.