I've 3 pages.. upload1.asp is a form to take info that will be used to upload a file to a dir and the other fields will be used to update a db. I then have a page "submit.asp" that process the info. I get this error when I try to submit the info...
Request object error 'ASP 0207 : 80004005'
Cannot use Request.Form
/v4/gy/submit.asp, line 43
Cannot use Request.Form collection after calling BinaryRead.
can some one please help me out?
'##############################UPLOAD1.asp###
<form enctype="multipart/form-data" method="POST" action="submit.asp">
<TABLE BORDER=0>
<tr><td><b>Enter your fullname:</b><br><INPUT TYPE=TEXT SIZE=40 NAME="FULLNAME"></td></tr>
<tr><td><b>Select a file to upload:</b><br><INPUT TYPE=FILE SIZE=50 NAME="FILE1"></td></tr>
</TABLE>
<input type="hidden" name="date" size="20" value="<%response.write(date())%>-<%response.write(time())%>">
larg_img<input type="text" name="larg_img" size="20"><br>
small_img<input type="text" name="small_img" size="20"><br>
author<input type="text" name="author" size="20"><br>
email<input type="text" name="email" size="20"><br>
category<input type="text" name="cat" size="20"><br>
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
'################END UPLOAD1.asp###############
'###############SUBMIT.asp#####################
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#INCLUDE VIRTUAL="adovbs.inc" -->
<!-- #include file="upload.asp" -->
<%
' Create the FileUploader
Dim Uploader, File
Set Uploader = New FileUploader
' This starts the upload process
Uploader.Upload()
Response.Write "<b>Thank you for your upload " & Uploader.Form("fullname"
& "</b><br>"
' Check if any files were uploaded
If Uploader.Files.Count = 0 Then
Response.Write "File(s) not uploaded."
Else
' Loop through the uploaded files
For Each File In Uploader.Files.Items
' Check where the user wants to save the file
'If Uploader.Form("saveto"
= "disk" Then
' Save the file
File.SaveToDisk "c:\inetpub\finalphase\
' Output the file details to the browser
Response.Write "File Uploaded: " & File.FileName & "<br>"
Response.Write "Size: " & File.FileSize & " bytes<br>"
Response.Write "Type: " & File.ContentType & "<br><br>"
Next
End If
%>
<%
Set MyConn = Server.CreateObject("ADODB.Connection"
MyConn.ConnectionString = "DBQ=C:\inetpub\finalphase\ Access Driver (*.mdb)}"
MyConn.Open
dim MyConn, sql, date, larg_img, small_img, author, email, cat %>
<%
date = Request.Form("date"
larg_img = Request.Form("larg_img"
small_img= Request.Form("small_img"
author= Request.Form("author"
email= Request.Form("email"
cat= Request.Form("cat"
'build up first INSERT
sql = "INSERT INTO gallery (larg_img,small_img,author,email,cat) values("
sql = sql & "'" & larg_img & "',"
sql = sql & "'" & small_img & "',"
sql = sql & "'" & author & "',"
sql = sql & "'" & email & "',"
sql = sql & "'" & cat & "')"
'execute first statement
myConn.execute sql
set myConn = nothing
%>
'######################END SUBMIT############
Request object error 'ASP 0207 : 80004005'
Cannot use Request.Form
/v4/gy/submit.asp, line 43
Cannot use Request.Form collection after calling BinaryRead.
can some one please help me out?
'##############################UPLOAD1.asp###
<form enctype="multipart/form-data" method="POST" action="submit.asp">
<TABLE BORDER=0>
<tr><td><b>Enter your fullname:</b><br><INPUT TYPE=TEXT SIZE=40 NAME="FULLNAME"></td></tr>
<tr><td><b>Select a file to upload:</b><br><INPUT TYPE=FILE SIZE=50 NAME="FILE1"></td></tr>
</TABLE>
<input type="hidden" name="date" size="20" value="<%response.write(date())%>-<%response.write(time())%>">
larg_img<input type="text" name="larg_img" size="20"><br>
small_img<input type="text" name="small_img" size="20"><br>
author<input type="text" name="author" size="20"><br>
email<input type="text" name="email" size="20"><br>
category<input type="text" name="cat" size="20"><br>
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
'################END UPLOAD1.asp###############
'###############SUBMIT.asp#####################
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#INCLUDE VIRTUAL="adovbs.inc" -->
<!-- #include file="upload.asp" -->
<%
' Create the FileUploader
Dim Uploader, File
Set Uploader = New FileUploader
' This starts the upload process
Uploader.Upload()
Response.Write "<b>Thank you for your upload " & Uploader.Form("fullname"
' Check if any files were uploaded
If Uploader.Files.Count = 0 Then
Response.Write "File(s) not uploaded."
Else
' Loop through the uploaded files
For Each File In Uploader.Files.Items
' Check where the user wants to save the file
'If Uploader.Form("saveto"
' Save the file
File.SaveToDisk "c:\inetpub\finalphase\
' Output the file details to the browser
Response.Write "File Uploaded: " & File.FileName & "<br>"
Response.Write "Size: " & File.FileSize & " bytes<br>"
Response.Write "Type: " & File.ContentType & "<br><br>"
Next
End If
%>
<%
Set MyConn = Server.CreateObject("ADODB.Connection"
MyConn.ConnectionString = "DBQ=C:\inetpub\finalphase\ Access Driver (*.mdb)}"
MyConn.Open
dim MyConn, sql, date, larg_img, small_img, author, email, cat %>
<%
date = Request.Form("date"
larg_img = Request.Form("larg_img"
small_img= Request.Form("small_img"
author= Request.Form("author"
email= Request.Form("email"
cat= Request.Form("cat"
'build up first INSERT
sql = "INSERT INTO gallery (larg_img,small_img,author,email,cat) values("
sql = sql & "'" & larg_img & "',"
sql = sql & "'" & small_img & "',"
sql = sql & "'" & author & "',"
sql = sql & "'" & email & "',"
sql = sql & "'" & cat & "')"
'execute first statement
myConn.execute sql
set myConn = nothing
%>
'######################END SUBMIT############