| | |
Asp upload BinaryRead error
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Sep 2006
Posts: 14
Reputation:
Solved Threads: 0
Hi everyone,
So I have a form that I'm running which has an option to upload a resume.
The form itself is actually multi-page but it all sits inside 1 asp file. The way I manage that is to use a select function and case function and depending on the "page" it will display the appropriate form material.
I have loaded in some asp code that I found online for uploading, and it works when it's stand-alone.
However when I incorporate it into my form code, it gives me the error
My code is as such
This bit of code sits right on top of everything else.
So what exactly have I done wrong and how can I go about fixing it?
Thanks for all of your advice and help.
-LP
PS. Ignore the session and application variables, it was part of a test that didn't go so well.
So I have a form that I'm running which has an option to upload a resume.
The form itself is actually multi-page but it all sits inside 1 asp file. The way I manage that is to use a select function and case function and depending on the "page" it will display the appropriate form material.
I have loaded in some asp code that I found online for uploading, and it works when it's stand-alone.
However when I incorporate it into my form code, it gives me the error
•
•
•
•
Request object error 'ASP 0206 : 80004005'
Cannot call BinaryRead
/members/Loader.asp, line 36
Cannot call BinaryRead after using Request.Form collection.
ASP Syntax (Toggle Plain Text)
<%@LANGUAGE="VBSCRIPT"%> <% Option Explicit %> <!--#include virtual="/Connections/CTRI_Web.asp" --> <!--#include file="Loader.asp"--> <% Const NUMBER_OF_PAGES = 4 Const DBOR = true Dim intPreviousPage Dim intCurrentPage Dim strItem Dim AbortMessage Dim AlertMsg Dim email Dim pw Dim pwconfirm Dim gonext Dim results Dim fitem Dim eMailResults Dim UploadAbortMessage Session("fileName") = "" Session("filePath") = "" Session("extension") = "" Session("eemail") = "" Application("pathToFile") = "" %> <% Function uHaul() Response.Buffer = True ' load object Dim load Set load = new Loader ' calling initialize method load.initialize ' File binary data Dim fileData fileData = load.getFileData("file") ' File name Dim fileName fileName = LCase(load.getFileName("file")) Session("fileName") = fileName ' File path Dim filePath filePath = load.getFilePath("file") ' File path complete Dim filePathComplete filePathComplete = load.getFilePathComplete("file") ' File size Dim fileSize fileSize = load.getFileSize("file") ' File size translated Dim fileSizeTranslated fileSizeTranslated = load.getFileSizeTranslated("file") ' Content Type Dim contentType contentType = load.getContentType("file") ' No. of Form elements Dim countElements countElements = load.Count ' Value of text input field "name" Dim nameInput nameInput = load.getValue("name") ' Path where file will be uploaded Dim pathToFile pathToFile = Server.mapPath("/Uploader/uploaded/") & "\" & Session("eemail") & Session("fileName") Application("pathToFile") = pathToFile ' Uploading file data Dim fileUploaded fileUploaded = load.saveToFile ("file", pathToFile) ' destroying load object Set load = Nothing End Function %>
This bit of code sits right on top of everything else.
So what exactly have I done wrong and how can I go about fixing it?
Thanks for all of your advice and help.
-LP
PS. Ignore the session and application variables, it was part of a test that didn't go so well.
![]() |
Similar Threads
- ASP.Net web config problem (ASP.NET)
- Upload image in asp javascript (ASP)
- ASP File Upload - best solution ? (ASP)
- FTP Upload (C++)
- File Upload in MySQL Database with ASP (ASP)
- PHP, ASP, ColdFusion, what's your fav? (IT Professionals' Lounge)
- Error while running ASP.NET (ASP.NET)
- ASP upload won't write to server (ASP)
- ADODB.Recordset error '800a0bb9' (ASP)
- Error message when running ASP email script (ASP)
Other Threads in the ASP Forum
- Previous Thread: ASP Cookie Detection Alert Code Issues
- Next Thread: Help (ASP)
Views: 855 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for ASP
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection calendar changeable connection current database databaseconnection diagnostics dreamweaver excel fso html iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile query record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit update web webserver windows7





