Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best route to take 2

Status
Not open for further replies.

Ferlin

Programmer
Jan 18, 2001
71
US
Hi All,

I am working on an inventory control program. I have over 4000 products in my inventory. I have a jpg picture of each product that I would like to show in a picturebox or image control. My question is what is my best route to take with this. Should I store over 4000 jpg's with my application, and have a link in my access97 database to each one, or how should I store them?

If I store them in my database, I will have one HUGE database. What is your opinions on the best approach to how I should proceed with the design of my program to accomadate the storage of these images?

Any input would be highly appreciated.

Thanks.

Ferlin.
 
There's pros and cons to this.

1) Store it in the database and you only have to keep track of a couple of files. But should the database get corrupted (all too easy in Access), and you lose it all.

2) Store them externally, and you have many files to track. Plus you need to name them intelligently to avoid duplicates.

Myself, I'd choose method #2, and name the files the same as the item key (but not the same as an Autonumber column). That way if the database gets corrupted you don't have to reload all those picture files. If you should have to re-enter the data manually, since you named them the same as the item, the picture should link up automatically.

Chip H.
 
If you store them as files, you will want to add some code to store them in at least 3 directories. There is a definate performance hit when you have more than 2,000 files in the same directory.
 
fluteplr -

Good idea. You could have 26 subdirectories, one for each letter in the alphabet, corresponding to the first letter of the item name.

Chip H.
 
chiph, fluteplr,

Thanks for the input. The jpg's are already named using the product item#. The subdirectories was a nice touch, but hence the files are named using numbers. Thanks for the tip on breaking the files down into seperate directories.

Later.

Ferlin.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top