asp表单的数据验证问题

来源:百度知道 编辑:UC知道 时间:2024/06/19 18:31:47
Sql = "SELECT * FROM pipsj where CatalogName='"&CatalogName&"'"
Set Rs = Db.ExeCute2(Sql)
if not rs.eof then
if Rs("wzjsj")=wzjsj then
Response.Redirect("ProdsList.asp")
else
Set Rs = Db.CreateRs()
Rs.Open Sql,Db.Conn,1,3
Rs("wzjsj")=wzjsj
Rs("CatalogID")=CatalogID
Rs("CatalogName")=CatalogName
Rs("Content")=Content
Rs("MdfyDate")=MdfyDate
Rs.Update
ID = Rs("ID")
Rs.Close
Set Rs = Nothing
end if
else
rs.close
set rs=nothing
Sql = "Insert Into pipsj(CatalogID,wzjsj,CatalogName,Content,AddDate,MdfyDate) Values('"&

先在Response.Redirect("ProdsList.asp")下面加一行
Response.end

如果wzjsj 被格式化了,rs的是数字型那就加个CLNG()

实在不知道是什么原因,那你就
if Rs("wzjsj")=wzjsj then
'Response.Redirect("ProdsList.asp")
Response.Write "["&Rs("wzjsj")&"]["&wzjsj&"]"
Response.End

看看这两个一不一样