asp 中处理异常

类别:Asp 点击:0 评论:0 推荐:


on error resume next
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from t_student where id=0",my_conn,1,3
rs.addnew
rs("studentID")="98106"
rs("studentName")="gzp"
rs("studentClass")="2"

rs.update
if err.Number=0 then
response.Write("ok")
else

response.Write("sorry")
end if

本文地址:http://com.8s8s.com/it/it8027.htm