Hi guys i got a question but i dunnoe if it fits in here.
I am told to do a function to allow user to upload a picture according to which record they are currently adding. So the picture is tie to the records. And when user do a search the picture that is link to the record will be show....
One way is to store the picture in the database, along with other fields of the record. To know how to do that, you can check out Beacon's thread at the top of the Database Forum.
The other method is to have a field in the record store the path of the picture file on the disk. Better still if you could allocate a specific directory to store all such pictures.
.
I am not a complete idiot. Some parts are still missing. Check out the rtf-help tutorial General VB Faq Thread Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink! Get more power for your floppy disks. ; View honeybee's Elite Club: Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
And if that response was mine, please think about giving me a rep. I like to collect them!
i just downloaded beacon tutorial. But its based on VB.. What i am actually looking for is doing it on line. For users to upload pictures along with the database... ANy ideas where can i find the coding?
Originally posted by baby i just downloaded beacon tutorial. But its based on VB.. What i am actually looking for is doing it on line. For users to upload pictures along with the database... ANy ideas where can i find the coding?
please help
VB and asp is pretty much same, you have to change the code slightly to make it work in asp.
There are many free upload component available, and your host server should already have it installed, check it with them.
You could do it through code, but its quite advanced coding, if you wish i could pass it to you.
I would advice you use uploader component provided by your host or free one available for downloads.
um.. i am not really sure if my this project will be put online but lets say right now i want it to work on my IIS. I am using the build in webserver INETPUB right now.
Is it possible? Can i get the coding for the upload of pictures to DB in asp format? cos i am not really sure how to convert VB -> asp..
Originally posted by baby um.. i am not really sure if my this project will be put online but lets say right now i want it to work on my IIS. I am using the build in webserver INETPUB right now.
Is it possible? Can i get the coding for the upload of pictures to DB in asp format? cos i am not really sure how to convert VB -> asp..
I have posted this link in ASP forum many times . Here is a very good ASP tutorial. Look my post in this thread.
hi danial thx for the site.. But i realise its displaying images from datbase. Do you have the link that shows how to store images in to Database as OLE object?
Originally posted by baby hi danial thx for the site.. But i realise its displaying images from datbase. Do you have the link that shows how to store images in to Database as OLE object?
Would really apperciate ur help
Well you havent mentioned that you wanted to store as OLE object .
Here you go, i have just what you looking for, hope this servers your purpose.
if u are looking for a free upload component, i think dundas software might be able to help you there. i had a similar project 3 years ago. i had used that component to upload the files into the webserver and then copy them to respective user areas.
when you download the component, it comes with some sample asp pages.
cheers,
abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
thx abhijit but i dun thinki can find the software u are referring to.
Danial - I went thru the coding u send me and i must say i dun really understand it. After some sourcing and google searching. I realise it actually can be done by storing the file name inside the database. Lets say under column pathname.
When u a user try to upload a file the path name will appear on the the text box EG: c:\mydocuments\pictures\image.jpg. Then just by taking the image.jpg store it in the database column pathname. And when displaying the page i will get the pathname and add in my server path and display the image.
Originally posted by baby thx abhijit but i dun thinki can find the software u are referring to.
Danial - I went thru the coding u send me and i must say i dun really understand it. After some sourcing and google searching. I realise it actually can be done by storing the file name inside the database. Lets say under column pathname.
When u a user try to upload a file the path name will appear on the the text box EG: c:\mydocuments\pictures\image.jpg. Then just by taking the image.jpg store it in the database column pathname. And when displaying the page i will get the pathname and add in my server path and display the image.
Is it wise to do that?
Please help
Hi,
You are right about storing the path and file name in the column of the database. Regarding the upload component, you can find plenty of other components to do the upload part for you.
Cheers!
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
Originally posted by baby do you have anyone that i can use?
And do you have the coding for the storing of path into database and uploading of file into a folder?
You can store the files/image on the database, or you can upload the files on to the server and store only the file name. You can upload the file using Component or pure code(very advanced asp code!).
You need to decide which approach to take then i can guide you through. Its around 6.0 am here , so i'll hit the bed. I will try to explain the cod to you tomorrow when i get a chance.
In the mean time you make up your mind about which approach to take .
Hi Danial... After some thoughts on what you said i have decided to use the store into my server folder approach.
Which in my case i store it inside this path name "c:\inetpub\wwwroot\project\images"
Thx for your detail explanation i am in time zone GMT +8 and its 1426hrs right now.
The summary on what i am doing now is:
I have to upload a picture along with a record. Its bascially a system for user to enter Project specs and project code etc... along with a picture of the project. And in my case i will do the storing of path methods as it seems much more simpler to do.
I will list down what i will need you to guide me
[list=1][*]Coding on uploading pictures to my c:\inetpub\wwwroot\project\images"[*]Writting the path name into the MS-DB[*]getting the path name out from the DB and displaying it.[/list=1]
Hi baby,
Sorry for the delay, i have been a bit busy with thing few things.
Ok lets get started, is it possible to post your database? If not then do you want me to put together an example of how to upload the image file and store the path into the database and also display those image.
I am using the free component the one posted by abhijit. So download the component and install it.
Hi Baby,
Here is something i put together quickly. It is mearly an example to get you started. Hope this helps. If you need more explanation of the code then let me know.
Things like form validation etc i have left it to you to do.
Are you using NTFS or FAT/FAT32 format? If its NTFS then right click on the folder and click on properties, go to security(see note) tab and add "Users" and give them write permission.
Note : If you are using simple file sharing then you need to: Open any folder, click Tools, Folder Options, Go to View Tab, Scroll down to the end, find "Use Simple File Sharing" and uncheck it.
Well in that case, I suggest that you need to do some validation.
Could you please post the script that you have written so far. I will try to see what I can do.
Cheers!
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
Originally posted by baby hi is it possible for you to highlight the coding you changed?
Firstly, could you please tell me if its working.
Cheers,
Abhijit
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz' save a blobFileStreamDataTable To Text Filemy blog
Originally posted by baby Hm.. after going thru the coding. I realise it doesnt allow user to post records only. Meaning every record have to have a picture.
How do i make it so that picture is not a must.
sorry really new to ASP
No worries, i assumed user will always submit picture. I have modified the code(process.asp and details.asp). Try out the code and let me know if you have any porblem.