[导入]ASP常用函数:Exec()

<%
'功能:执行SQL语句
'来源:http://jorkin.reallydo.com/article.asp?id=487

Public Function Exec(sCommand)
    
On Error Resume Next
    
OpenConn()
    
Set Exec = oConn.Execute(sCommand)
    
If Err Then
        
WriteLn Err.Source & ",请检查您的查询代码是否正确。<br />"
        
WriteLn "Error : # " & Err.Number & " <br />"
        
WriteLn "Description : " & Err.Description & "<br />"
        
WriteLn "Command : " & Server.HTMLEncode(sCommand) & "<br />"
        
Err.Clear
        Response.End
    End If
End Function
%>


文章来源:http://Jorkin.Reallydo.Com/default.asp?id=487
posted @ 2008-03-16 21:17  pboy2925  阅读(228)  评论(0编辑  收藏  举报