By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,655 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,655 IT Pros & Developers. It's quick & easy.

Upload Images to DB vb and SQL

P: 19
Hi Guys

Havent put anything together yet just needed some advice or pointers in the right direction. Im building a small ecommerce site and need an admin page that will upload info about the product and am image to the database. One tutorial advised creating a seperate table just for the image and seemed to save the image as byte array but doesnt actually seem to save the image to a directory as such, and another approach i looked at came from a downloaded starter kit which saved the image to a gallery folder within the site and added the info for the file to the db.

My question is, which one is better, whats the benefit of using one over the other,

As im a newbie im looking for the easiest approach, also i dont particularly want to split the info for the image and product seperatley, id like ideally to keep this together.

Any tutorials and advice would be greatly appreciated.

Thanks in advance
Apr 23 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 4,871
My approach is to store the location, so I am in in favour of later approach.
Apr 24 '07 #2

P: 5
Try this tutorial

I am doing just as you want to do. We upload a thumbnail and a larger version of each image on the upload and store them into a db It should not matter if it is in a separate db or not.

As for datatypes you should be using a varbinary(max)

Be sure to store the mime type with the image record.
Apr 27 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.