调试中出现的问题,请大侠解答
ADODB.Recordset 错误 '800a0cc1' 在对应所需名称或序数的集合中,未找到项目。
/2626/CN_AdmProduct/edit.asp,行 313
代码如下(313行已经用红色标记):
'=============================== 更新数据库记录
Set oRs = Server.CreateObject("ADODB.Recordset")
sSQL = "Select * From " & tableName1 & " Where ID=" & nID
oRs.Open sSQL,conn,1,3
If nID = 0 Then oRs.AddNew()
oRs("star")=star
oRs("num")=num
mmI=0
do while mmI<fieldNum
If field(mmI,0) <> "" Then
oRs(field(mmI,2))=field(mmI,0)
End If
mmI=mmI+1
Loop
oRs.Update()
oRs.Close()
If nID=0 Then
oRs.open "select top 1 ID from products order by ID desc",conn,3,3
nID=oRs(0)
oRs("fileName")="jiudian" & nID & ".html"
oRs.update
oRs.close
End if
strFileName=request("fileName")
If strFileName="" Then strFileName="jiudian" & nID & ".html"
If strFileName<>"" then
response.redirect "/sendDetail.asp?act=1&redirect=jiudian&sourceUrl=hotel.asp__ID=" & nID & "&fileName=" & strFileName
else
Response.Write("<script>alert('操作成功.');history.go(-2);</script>")
End if