《实例精粹ASP》中部分源代码
源代码在线查看: orderprocesssave.asp
dim strSQL, cmdObj, rsObj
dim nID
nID = RealString(Request.Form("id"))
Set cmdObj = Server.CreateObject("ADODB.Command")
Set rsObj = Server.CreateObject("ADODB.RecordSet")
cmdObj.CommandText = "SELECT * FROM OrderList WHERE id = "& nID
cmdObj.CommandType = adCmdText
Set cmdObj.ActiveConnection = conn
'查找待修改的记录
rsObj.Open cmdObj, , adOpenKeyset, adLockOptimistic
rsObj("state") = 1 '设置为已处理
rsObj("treatedDate") =now() '处理日期
rsObj("treatedRemark") = Request.Form("treatedRemark") '处理说明
rsObj.Update
'关闭连接,将连接放放连接池
rsObj.Close
set rsObj = nothing
set cmdObj = nothing
CloseConn()
%>
alert("处理成功!");
this.document.location = "";
-->