View Full Version : Browse for image and insert into database automatically using asp
ooiooipig
01-13-2003, 04:53 AM
Hi all, can anyone help me with this problem?? I'm doing an E-Bookstore. When the bookstaff adds in a new item, how can i make it such that they browse for the picture of the new object then the new picture is being inserted into the database?? I hope you guys can help me with this problem.
thanks alot!!
Morgoth
01-13-2003, 07:04 PM
Well, it's a little confusing of what you are asking for.
You want to add an image link or the accual image to the database?
Where are the bookstaff people, looking for the image, where is the place there are browsing? Is it on the same server as the site?
Do you know how ASP will reconize that a person picked a certain image? (Like pictures/links you already added in the database manualy.)
whammy
01-14-2003, 12:32 AM
You need an upload component... try:
http://www.dundas.com
Of course, you can write your own, and I've seen some tutorials on it, but to be honest I haven't had the time (or need) to mess with this, yet.
ooiooipig
01-14-2003, 01:12 AM
the new picture is to be browsed and retrieved from any folders in "C" Drive and the new picture that is being retrieved is being insert into the database.
At the moment, to retrieve the pictures, i've only put down the link in the database. I've stored all the pictures in a folder call "images". all the pictures are retrieved from there.
Morgoth
01-14-2003, 02:42 AM
Ahh... So you don't need to upload anything.
Ok, then, make a page where each picture is displayed, and then create it so that each picture can be clicked on, and link to a page such as "PictureIWant.asp".
You will link like this:
http://Site.com/files/PictureIWant.asp?picture=This1
When the page loads, "This1" will be looked at and determan what picture they used and add the link to the picture into the database where it should go.
It sounds simple, but it could be hard.
The question is, do you understand what I said?
ooiooipig
01-14-2003, 03:10 AM
this part i've done already. but now is another part whereby i need to insert in new pictures from "C" drive into the database. is there anyway i can do that?? or must i always put the new pictures in the "images" folder then go to the database and insert it in by myself??
Morgoth
01-14-2003, 05:06 AM
Well, acually, I am not to sure what you mean by inserting into the database. Inserting the picture as binary, or inserting the link?
Either way, the only way you can do it is do it manualy, or if you have time, write out a script to do it for you in the way you want.
Understand?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.