Skip to main content
Participating Frequently
November 9, 2006
Question

MS ACCESS, ColdFusion and Image Problems

  • November 9, 2006
  • 2 replies
  • 502 views
I have done this before using PHP and Mysql and it was pretty simple. I now need to do this in ColdFusion and MS Access 2003.

I want to store logos in a database. After reading up on it, I found that you store images in Access using the OLE Object Datatype - done. Now the real fun part starts.

I am trying now to display these logos from the MS Access 2003 database onto a webpage using Coldfusion. I have looked into it, and one article suggested using the BLOB type - which is what you do in MySQL, but in MS Access that option is not available. So I looked into it somemore, and it seems that there are three functions that you need to use, and they are in Visual Basic - provided in part by Microsoft, but it seems EXTREMELY way too complicated for simply displaying an image staored in a Database.

Has anyone been able to store and display images using MS Access and Coldfusion before? If so, could you guide me?
This topic has been closed for replies.

2 replies

Participating Frequently
November 9, 2006
The reason for storing the image in the database is that our company wants it that way for portability reasons. Filenames change, directories get lost when moving from one system to another. Databases are easier to backup and are more efficient when it comes to searching metadata. We have over 300 logos we must store for our different organizations - having a directory for each is complicated.

Has anyone had issues like this with Coldfusion and MS Access? If so could you guide me?

-Thanks
Participating Frequently
November 10, 2006
Create logo.cfm
Inside logo.cfm - cfquery 'select imgbody from logos where url.id';
use cfcontent.
in html - use <img src="logo.cfm?id=xxx" with exact width and height

BLOB works fine with cfqueryparam and Access - i"ve tried by myself..
November 9, 2006
Is there a reason you are storing the image, and not its filename, in the database? With Access, as well as most other database, pointing to a directory structure/filename.jpg from a database column is as fast, or faster, than hauling the image out of a database.