在ASP中判断SQL语句是否执行成功
2000-11-06 10:13:49 来源:WEB开发网核心提示:利用err对象: sql="insert into table(f1,f2) values('v1','v2')" conn.execute sql if err.number<>0 then response.write "出错
利用err对象:
sql="insert into table(f1,f2) values('v1','v2')"
conn.execute sql
if err.number<>0 then
response.write "出错了:"& err.description err.clear
else
response.write "OK"
end if
sql="insert into table(f1,f2) values('v1','v2')"
conn.execute sql
if err.number<>0 then
response.write "出错了:"& err.description err.clear
else
response.write "OK"
end if
[]
更多精彩
赞助商链接