How to Insert Record and Upload file using the FreeASPUpload Script

后端 未结 1 1090
[愿得一人]
[愿得一人] 2020-12-20 09:33

I want to Insert record and upload file at the same time, right now im using FreeASPUpload Script. When i submit the form it returns this error

Cannot use t         


        
相关标签:
1条回答
  • 2020-12-20 09:45

    I haven't used AspFreeUpload much so I'm guessing a bit here.

    It would appear that using the Request object isn't an option so you're stuck with having to use the Upload.Form. As your code stands, the Upload object is only defined and set within the context of your SaveFiles function.

    Try moving your database insert code to within the SaveFiles function. This would mean cutting everything from the line

    Dim objConn, objRs
    

    to

    InsCom.Execute
    

    and pasting it just before 'End Function'

    You may also need to move your include adovbs.inc directive to somewhere before the function was called. The most logical place would be on the line immediately below your other include directive = for uploadclass.asp

    0 讨论(0)
提交回复
热议问题