带有response.form的ASP 80004005错误

时间:2018-03-20 14:32:09

标签: asp-classic http-post

当我将一些数据发布到Classic ASP文件时,它会在我的request.form上遇到此错误80004005。

我也尝试使用“On Error Resume Next”进行调试,当我显示“Status”变量时,它是空的。

我没有做什么来获取POST方法数据

ASP文件:

<%

On Error Resume Next



StatusDate      = Request.Form("StatusDate")
StatusTime      = Request.Form("StatusTime")
Status          = Request.Form("Status")

Dim d
Dim ConvertedStatus 

If Status = 1 Then
     ConvertedStatus = "Completed"
     d =CDate( StatusDate + " " + StatusTime)
End If


    sql             = "UPDATE table_name set status ='" + Status + "'" 



Dim RecordsAffected
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "sql db connection string "



conn.Execute sql, RecordsAffected, adExecuteNoRecords

If RecordsAffected = 0 or Err.Number <> 0 then
    If RecordsAffected = 0 then
        writeToLog(" |No record affected or SQL query error :" + sql)
    end if 

    if Err.Number <> 0 then
        writeToLog(" |Error (" & Err.Number & ") occurred: " & Err.Description)
    end if 
end if


conn.close
conn = nothing




%> 

示例html帖子

 <form action="/update.asp" method="post">
 Status: <input type="text" name="Status"><br>
 StatusDate: <input type="text" name="StatusDate"><br>
 StatusTime: <input type="text" name="StatusTime"><br>
 <input type="submit" value="Submit">
 </form>

0 个答案:

没有答案