Last post Jul 13, 2009 03:19 AM by vora_bhaumik
Apr 07, 2009 02:52 PM|Guled|LINK
This is my situation:
I have three columns and image name column (4 colums in total) to be inserted into SQL SERVER database. I want upload image and store into web folder called "publicfolder" which I did but also I wnat that image name to be inserted into table in MS SQL
SERVER 2000 as well as retrieve image from image folder using image name from database . I will appreciate your help:
This is my code:
inserting into database:
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Display data and image on asp page:
how do I display image from database?
Thanks in advance.
Apr 08, 2009 04:23 AM|vora_bhaumik|LINK
Check the Follwoing link.
Apr 08, 2009 08:39 AM|Guled|LINK
I look at the link but that is not what I was looking for. I have not problem loading image directly into database, but I want is may I was not clear, here is what I need to do:
I have page that users have to use to provide their name and email as well as thier picture:
I have a table with four columns: firstname, lastname, email and imagename
1. image stored into a folder called" publicfolder" locate web root
2. insert data for firstname, lastname , email and image pathname into the table.
3. retrieve firstname , lastname, email, and imagename from table . and imagename from table should also get image from "publicfolder" folder in web root.
4. display all on GRiedview.
Jul 13, 2009 03:19 AM|vora_bhaumik|LINK
You just save the file name in database so that you can retrieve the imagefilename and bind it to any data display controls like datalist or grid view.
you can save filename in database with relation to userid i.e have 2 columns in database
user id int not null..
when ur saving the file in Image folder Pmap ,use this format
and save the lbluploadresume.text in database so that you with the uploaded filename userid will be attached so that if u have same filename for different users the new file will replace the old one.
when Your are retreiving the Image use this code