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

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

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

<%
 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]


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

查看所有标签

猜你喜欢:

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

The Black Box Society

The Black Box Society

Frank Pasquale / Harvard University Press / 2015-1-5 / USD 35.00

Every day, corporations are connecting the dots about our personal behavior—silently scrutinizing clues left behind by our work habits and Internet use. The data compiled and portraits created are inc......一起来看看 《The Black Box Society》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具