Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[1615] Uploading Files with ASP

Last post 04-19-2005 7:05 AM by selvass. 96 replies.
Page 1 of 7 (97 items) 1 2 3 4 5 Next > ... Last »
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [1615] Uploading Files with ASP

    This thread is for discussions of Uploading Files with ASP.

    • Post Points: 0
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 10-18-2001 3:21 PM In reply to

    The VB code will not compile (as usual)

    How is the cFormItem datatype defined???
    • Post Points: 0
  • 10-18-2001 7:40 PM In reply to

    • James Crowley
    • Top 10 Contributor
    • Joined on 12-07-2000
    • United Kingdom
    • Guru
    • Points 15,055
    • SystemAdministrator
    • Post Points: 0
  • 10-19-2001 2:23 AM In reply to

    • mae
    • Not Ranked
    • Joined on 10-19-2001
    • New Member
    • Points 5

    got permission denied error

    should i register the dll?
    • Post Points: 0
  • 10-19-2001 6:22 AM In reply to

    Invoking MSWord application through ASP

    My webbased application using ASP needs to open an existing word document at the client side . Also i need to send some information from the database to this document. Everything must be done with ASP.
    I have tried to create an instance of the word application using the CreatObject("Word.Application"). This doesnt work and instead it says, Active X component cannot create object. But when i see in the task manager window, i can actually see the instance of the word created. My browser is IE5.5 SP2.
    Is there any other method of invoking Word. Please suggest
    • Post Points: 0
  • 10-19-2001 2:14 PM In reply to

    • James Crowley
    • Top 10 Contributor
    • Joined on 12-07-2000
    • United Kingdom
    • Guru
    • Points 15,055
    • SystemAdministrator
    Yes, using regsvr32.exe. If you are getting a 'permission denied' error, you need to check that you gave IUSR_COMPUTERNAME  the rights to access the DLL, as described here
    • Post Points: 0
  • 10-19-2001 2:15 PM In reply to

    • James Crowley
    • Top 10 Contributor
    • Joined on 12-07-2000
    • United Kingdom
    • Guru
    • Points 15,055
    • SystemAdministrator
    You can't open a client-side document using ASP; that would be paramount to giving your script access to each visitors PC....!! When you use Server.CreateObject, it's creating a word object on your server, not the visitors pc... so you won't be able to open their documents.
    • Post Points: 0
  • 10-19-2001 4:04 PM In reply to

    • manuela
    • Not Ranked
    • Joined on 10-19-2001
    • New Member
    • Points 5

    Invoking Word from ASP

    Apologies for the basic nature of my comment. Does this answer mean that you can open a server based Word document using ASP? How can I use Server.CreateObject so that my web application opens a word template sitting on the same server and transfer text from one asp page to this document. We are using ASP 2.0/SQL7.0/IE3.X to 5.5 and Word97/2000.
    • Post Points: 0
  • 10-23-2001 4:26 AM In reply to

    no closed parentheses

    Here is a snippet of the code for uploadcomplete.asp:

       Else
           'add description to the database?
           'cConn.Execute ("INSERT INTO mydocs (FileName,Description) VALUES ('" & objUpload.Form("thefile").Value & "','" & objUpload.Form("description").Value
           strMsg = "The file was successfully uploaded."
       End If

    Look at the part 'cConn.Execute ("INSERT...  You will notice there is no closing parentheses for this one I just quoted.  That don't seem right?
    • Post Points: 0
  • 10-23-2001 4:47 AM In reply to

    Here is the error I have gotten:

    Error Type:
    Microsoft VBScript compilation (0x800A0400)
    Expected statement
    /uploaddemo/uploadcomplete.asp, line 10
    ("ASPUploadComponent.cUpload")

    I don't think your asp is written correctly.  Think?

    Further more where exactly is this dll that we made supposed to go?  In C:\Inetpub\scripts?  And shouldn't the IUSR_MachineName be given read and execute in the entire folder not just on a file in that folder?

    Back to the drawing board.
    • Post Points: 0
  • 10-23-2001 4:52 AM In reply to

    One last one and then I gotta crash

    Fixed the first error but now I get this one:

    Error Type:
    Microsoft VBScript runtime (0x800A01B6)
    Object doesn't support this property or method: 'FileExists'
    /uploaddemo/uploadcomplete.asp, line 18


    This comes from:

    If objUpload.FileExists("theFile") = False Then
       Response.Write "Invalid Post Data"
       Response.End
    • Post Points: 0
  • 10-23-2001 5:11 AM In reply to

    Hey now never mind

    Thank you man.  sorry for he trouble.  It works Marvelous.
    • Post Points: 0
  • 10-23-2001 5:26 AM In reply to

    Can I just chime in once more?

    It is uploading just fine.  But in the confirmation I am just getting

    <%=objUpload.Form("thefile").Value%>
    <%=objUpload.Form("thefile").FileSize%>
    <%=objUpload.Form("thefile").ContentType%>
    <%=objUpload.Form("description").Value%>


    No

    <p><%strMsg%><P>

    This does not seem to be called:

    Description
       Else
           'add description to the database?
           'cConn.Execute ("INSERT INTO mydocs (FileName,Description) VALUES ('" & objUpload.Form("thefile").Value & "','" & objUpload.Form("description").Value
           strMsg = "The file was successfully uploaded."
       End If

    I have disabled caching.  Do you think that's an issue?

    <%
    Option Explicit
    'Don't cache the page
    Response.AddHeader "Pragma", "No-Cache"
    Response.CacheControl = "Private"
    %>

    In upload.asp

    George Hester
    • Post Points: 0
  • 10-23-2001 5:31 AM In reply to

    I'm so bad

    <%=strMsg%>
    not
    <%strMsg%>
    George Hester
    • Post Points: 0
  • 10-23-2001 10:24 AM In reply to

    • James Crowley
    • Top 10 Contributor
    • Joined on 12-07-2000
    • United Kingdom
    • Guru
    • Points 15,055
    • SystemAdministrator
    OK... I've got a few things to respond to then... ;-)

    -> No closed parentheses <-
    You are correct.... I didn't get a syntax error as I had commented the item out... it was just to give the reader an idea of what else they could do. I have corrected that.

    -> Folder Permissions <-
    There were actually 2 sets of permissions that you needed to set. One was described on page 2, telling you to set Write permissions for the upload directory. The other was on page 7, telling you to give IUSR_MACHINENAME the rights to execute the DLL

    -> Object doesn't support this property or method: 'FileExists' <-
    That was a typo on your side... ;-) It should have been FieldExists

    Regards,

    James
    • Post Points: 0
Page 1 of 7 (97 items) 1 2 3 4 5 Next > ... Last »