可以让程序告诉我详细的页面错误和数据库连接错误吗?

栏目: 编程语言 · 发布时间: 6年前

内容简介:可以让程序告诉我详细的页面错误和数据库连接错误吗?

<%
 If Err.Number <> 0 Then
 '
错误处理.
       Response.Clear
       '
清除缓冲区.
 

     Select Case Err.Number
            '
根据不同错误分处理.
    Case ""

' 指定错误类型:此处填加我们指定的错误处理代码.
      Case Else

 ' 一般错误.

            If IsObject(objConnection) Then
                  If objConnection.Errors.Count > 0 Then %>
<B>
撼雪喷云之数据连接对象错误报告</B>
<% For intLoop = 0 To objConnection.Errors.Count - 1 %>
错误号: <%= objConnection.Errors(intLoop).Number %><BR>
错误描述: <%= objConnection.Errors(intLoop).Description %><BR>
错误源: <%= objConnection.Errors(intLoop).Source %><BR>
SQL
状态: <%= objConnection.Errors(intLoop).SQLState %><BR>
本地错误: <%= objConnection.Errors(intLoop).NativeError %><P>
<% Next
   End If
   End If
   If Err.Number <> 0 Then %>

<B>
撼雪喷云之页面错误报告</B><BR>
错误号:<%= Err.Number %><BR>
错误描述:<%= Err.Description %><BR>
错误源:<%= Err.Source %><BR>
错误发生行:<%= Err.Line %><P>
<%
            End If
      End Select
End If
%>

[1]


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Responsive Web Design

Responsive Web Design

Ethan Marcotte / Happy Cog / 2011-6 / USD 18.00

From mobile browsers to netbooks and tablets, users are visiting your sites from an increasing array of devices and browsers. Are your designs ready? Learn how to think beyond the desktop and craft be......一起来看看 《Responsive Web Design》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试