復制代碼 代碼如下:
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