欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

asp在線執(zhí)行sql語句的函數(shù)

 更新時(shí)間:2008年03月05日 14:31:03   作者:  
好多asp后臺(tái)都提供了一個(gè)可以在線執(zhí)行sql語句的功能,今天看到了,用到了事務(wù)管理,就是出錯(cuò)了就回滾的操作,不錯(cuò),建議大家看看,以后能用的到

復(fù)制代碼 代碼如下:

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語句輸入錯(cuò)誤!",2) 
    else 
        conn.committrans 
        conn.close:set conn = nothing 
        call alertbox("恭喜!sql語句執(zhí)行完畢!",2) 
    end if 
end sub

相關(guān)文章

最新評論