문제

ORIGINAL QUESTION
(How can I display images from a MySQL database in an Access 2007 form?)


I would like to use Access 2007 to interface to a MySQL database and display pictures and other data in a form.

I already have an Access 2007 application that I don't want to change much, if I can help it. I'm just not sure what data type will work. "Attachment Data Type" is not supported in MySQL. Also, my client wants to be able to open and edit the image.


SOLUTION to UPDATED QUESTION
(How can I work around the 2GB database limit of MS Access (for displaying images)?)


(1) Store the filenames of the images in MS Access
(2) Use VBA to dynamically display them in a form (see How to display images from a folder in a form, a report, or a data access page).

To make the images editable:
(1) Make sure the file type (e.g. ".jpg") is associated with the image editor of choice.
(2) Using the same variable names as in the article mentioned above, add the following code to the form in which ImageFrame is located (see How to open a file in its default application using VBA)

Private Sub ImageFrame_Click()
    Application.FollowHyperlink (txtImageName)
End Sub



A few other sources that may be useful

Perl, MySQL, and Blobs

VB, MySQL, and Blobs

Using images in Access

Using MS Access as a front end to PostgreSQL.

A special thanks to MindStalker for his comment that got me started on yet another round of "Googling".

도움이 되었습니까?

해결책

See the solution mentioned in the question above.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top