asp+vbscript 如何捕捉insert语句执行的错误???????////在线等
%
ss_name=requset( "txtSS ")
sql= "insert dorm (dorm_name) values( ' "&ss_name& " ') "
//我想实现下面这条语句的功能,但是希望有返回值,判断是否成功插入
conn.execute(sql)
%>
------解决方案--------------------%
on error resume next
ss_name=requset( "txtSS ")
sql= "insert dorm (dorm_name) values( ' "&ss_name& " ') "
//我想实现下面这条语句的功能,但是希望有返回值,判断是否成功插入
conn.execute(sql)
if err.number=0 then
Response.Write "Succeed "
else
Response.Write "Failed "
end if
%>