加入收藏 | 设为首页 | 会员中心 | 我要投稿 汽车网 (https://www.0577qiche.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

asp在线实现sql语句的函数

发布时间:2023-08-28 10:59:38 所属栏目:Asp教程 来源:
导读:asp在线执行sql语句的函数

复制代码 代码如下:

function gfv(str)
gfv = request.form(str)
end function

sub executesql
dim content:content = gfv("content")
on error resume next
asp在线执行sql语句的函数

复制代码 代码如下:

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

(编辑:汽车网)

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

    推荐文章