Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

displaying images in MS ACCESS or some other database

Thread Tools
 
Search this Thread
 
Old 25 August 2004, 03:07 PM
  #1  
DazV
Scooby Regular
Thread Starter
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Default displaying images in MS ACCESS or some other database

Which method ?

I need to write a cataloguing application that will utilise an EXISTING library of over 1000 jpg images

Each image needs to be associated with a record in the database, either by:

a) Duplicating the image and storing it directly into the database (seems wasteful)

b) Simply linking to the existing image (field would contain path only)

Can someone advise what the best approach would be ?

I'm currently using a field type of "OLE OBJECT" and on the form, using a "BOUND OLE CONTROL" to display the image. At present it will display a .bmp but NOT a .jpg!

Thanks all!
Old 25 August 2004, 03:11 PM
  #2  
AllenJ
Scooby Regular
 
AllenJ's Avatar
 
Join Date: Mar 2004
Posts: 752
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by DazV
Which method ?

I need to write a cataloguing application that will utilise an EXISTING library of over 1000 jpg images

Each image needs to be associated with a record in the database, either by:

a) Duplicating the image and storing it directly into the database (seems wasteful)

b) Simply linking to the existing image (field would contain path only)

Can someone advise what the best approach would be ?

I'm currently using a field type of "OLE OBJECT" and on the form, using a "BOUND OLE CONTROL" to display the image. At present it will display a .bmp but NOT a .jpg!


Thanks all!
I believe since it needs to be associated with a record in the DB, it's better to store it as a blob field in the DB. SQL server accepts blob fields, not 100%sure about access but i think it does.
HTH
Old 26 August 2004, 08:34 AM
  #3  
GaryK
Scooby Regular
 
GaryK's Avatar
 
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes on 0 Posts
Default

Daz,

As allen states you need to be storing the images directly in the database as blob. Storing a filepath in the DB is OK but what if files get renamed/lost/moved etc. suddenly your links are useless, storage isnt really an issue and storing directly in the DB is the best way to go.

However Access doesnt support BLOBs, only OLE Objects so what it is actually doing is wrapping the object with container that knows how to open/display the object, so if you are storing an image chances are its using MS paint to actually render the image which is why you cant handle JPGs. It does this to simplify things, if you store an object as a BLOB in DB that supports them then it doesnt know or care what it is so you have to take care of opening it and displaying it yourself.

You could continue down the OLE route because it would work but I'm not sure about performance if you have a large number of concurrent users. You may want to consider an alternative such as MSDE which believe it or not is MS SQL Server engine (about 98% feature complete) which MS offer as a free download. You just need a 'front-end' tool to manage it, this does handle BLOBs.

Good luck!


Gary
Old 26 August 2004, 10:25 AM
  #4  
DazV
Scooby Regular
Thread Starter
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Default

thanks guys - as ever, some great info.

Ok, so it looks like it would be prudent to load the image data into the database itself.

But access it seems isn't equipped to handle BLOBS

So I could move to MSDE as you state, or perhaps mySQL

Next decision is how to interface with the chosen database - normal choices would be Visual Basic, Visual C++, but, I'd like to give it a try with a browser and a server side scripting language like PHP or ColdFusion - anyone think this is a bad idea (before I start)

Cheers all,
Old 26 August 2004, 12:40 PM
  #5  
GaryK
Scooby Regular
 
GaryK's Avatar
 
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes on 0 Posts
Default

Daz,

Dont think its a bad idea but could be if you're not fully au fait with the language, what makes integrated development environments such as VB,VC++ (and delphi my weapon of choice oo-er) is that they ease the learning curve and allow you to be productive without necessarily being an expert in the language, I dont know if an IDE for PHP exists and have little knowledge of CF but someone here is bound to know!

cheers

Gary
Old 26 August 2004, 01:26 PM
  #6  
DazV
Scooby Regular
Thread Starter
 
DazV's Avatar
 
Join Date: Jun 2000
Posts: 3,783
Likes: 0
Received 0 Likes on 0 Posts
Default

I'm well versed in CF, so I think I'll proceed on that basis and see how I get on.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
hardcoreimpreza
Computer & Technology Related
21
11 October 2015 03:40 PM
TylerD529
General Technical
2
09 October 2015 01:53 AM
powerwrx
Non Scooby Related
21
03 October 2015 11:31 PM
Ganz1983
Subaru
5
02 October 2015 09:22 AM



Quick Reply: displaying images in MS ACCESS or some other database



All times are GMT +1. The time now is 06:19 PM.