加入收藏 | 设为首页 | 会员中心 | 我要投稿 银川站长网 (https://www.0951zz.com/)- 云通信、基础存储、云上网络、机器学习、视觉智能!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

asp在线实行sql语句的函数

发布时间:2023-07-21 13:09:21 所属栏目:Asp教程 来源:
导读:代码如下:function gfv(str) gfv = request.form(str)end functionsub executesql dim content:content = gfv("content") on error resume next conn.begintrans conn.execute(content) if e

代码如下:

function gfv(str)

    gfv = request.form(str)

end function

sub executesql 

    dim content:content = gfv("content") 

    on error resume next 

    conn.begintrans 

    conn.execute(content) 

    if err.number <> 0 then 

        err.clear 

        conn.rollback 

        conn.close:set conn = nothing 

        call alertbox("抱歉!sql语句输入错误!",2) 

    else 

        conn.committrans 

        conn.close:set conn = nothing 

        call alertbox("恭喜!sql语句执行完毕!",2) 

    end if 

end sub

(编辑:银川站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章