当前位置:网络资源中心文章中心网络编程ASP教程 → 文章内容

在ASP中判断SQL语句是否执行成功 (1)

减小字体 增大字体 作者:小猪  来源:网咯收集  发布时间:2008-5-16 9:46:50
利用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