Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 24th, 2004, 03:38 AM
Authorized User
 
Join Date: Jul 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please Help

Hi i've got a question and i can't find the answer to it anywhere. I have created a database where users can enter records via the web. now, however, i want to add the functionality for the user to add

an attachment to the database. The attachments could be any kind of file at all including pdf’s of schematics, other emails etc. When someone wants to add an attachment to the database, they will have to select the file on their machine via a browse window or something and it will be physically copied to the server. The idea would be to have a link appear for each uploaded attachment that the user can click on to download or open the file when viewing the record later, anybody have any ideas how to do this in asp?

i can't find any help anywhere! thanks a million!


 
Old August 24th, 2004, 04:26 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear treasacrowe
 For this you should use the object which wil upload the file from user and then store on the server

<%
Set Upload = Server.CreateObject("Persits.Upload")
Set File = Upload.Files("FILE1")
Filename = file.Filename

        ' check if file exists in c:\upload under this name
        If Upload.FileExists("c:\upload\" & filename ) Then
            Response.Write "File with this name already exists."
        Else
            ' otherwise save file
            File.SaveAs "c:\upload\" & File.Filename
%>

This will store the file on your server and the path and the name of the file can get by
<% File.Path %> property


(*_*)


Numan
--------------------------------------------------
Love is the most precious thing of this world. So find and grab it!
 
Old August 25th, 2004, 03:31 AM
Authorized User
 
Join Date: Jul 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks a million!

 
Old August 29th, 2004, 05:24 PM
Authorized User
 
Join Date: Nov 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is that built in to standard ASP?
I couldn't find it in any of my 3 bible-thick books about ASP

where do you read more about this object?
didn't find anything in www.MSND.com either ...

curious
/Paw
 
Old September 16th, 2004, 12:55 PM
Authorized User
 
Join Date: Sep 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No its an component that you can get from various sites. There is other upload componets that you can download to.. Do a search for ASP uploads.









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.