在ASP中判断SQL语句是否执行成功 (1)
利用err对象:
sql=%26quot;insert into table(f1,f2) values('v1','v2')%26quot;
conn.execute sql
if err.number%26lt;%26gt;0 then
response.write %26quot;出错了%26quot;%26amp; err.description err.clear
else
response.write %26quot;OK%26quot;
end if
sql=%26quot;insert into table(f1,f2) values('v1','v2')%26quot;
conn.execute sql
if err.number%26lt;%26gt;0 then
response.write %26quot;出错了%26quot;%26amp; err.description err.clear
else
response.write %26quot;OK%26quot;
end if





