开发者

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

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜