p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: RE: pertinence of the connection error object


Message #1 by "Olivier Plamondon" <oplamondon@t...> on Thu, 27 Jun 2002 13:38:58 -0400
It will help, thanks a lot.


-----Message d'origine-----
De : Drew, Ron [mailto:RDrew@B...]
Envoy=E9 : 27 juin, 2002 13:32
=C0 : ASP Databases
Objet : [asp_databases] RE: pertinence of the connection error object


........I setup a little error routine like so...
<%
On Error Resume Next
'***********************************************************************
***************
'***   Subroutine DisplayError
'***********************************************************************
***************
Sub DisplayError(Connection,errNum,errDesc,errSource,proc)
    Response.Write("<H4 align=3Dcenter> Program Message </h4>")
    Response.Write("VB Error Number: <b>" & errNum & " [0x" &
Hex(errNum) & "]</b>")
    Response.Write("<br>Err.Description: <b>" & errDesc & "</b>")
    Response.Write("<br>Err.Source: <b>" & errSource & "</b>")
    Response.Write("<br>Procedure: <b>" & proc & "</b>")
    Response.Write("<br>Connection errors: <b>" &
Connection.Errors.Count & "</b>")
    If (Connection.Errors.Count > 0) Then
       For Each ErrorMsg in Connection.Errors
           Response.Write("<br>" & ErrorMsg.Description)
       Next
    End If
End Sub
%>
.........and where the db access is like so....where cnDB is my
connection.....
If (Err.number <> 0) then
	set cnDB =3D nothing
	DisplayError cnDB, Err.Number, Err.Description, Err.Source,
"Connection"
End if
.............  Look at  http://asp-help.com/database/db_errors.asp




-----Original Message-----
From: olivier plamondon [mailto:oplamondon@t...]
Sent: Thursday, June 27, 2002 12:41 PM
To: ASP Databases
Subject: [asp_databases] pertinence of the connection error object


  I have been working in with databases via ASP for about three weeks
now, I have implanted a way of working with errors that seemed optimal
to
me. I use the err object and the Errors object from the ADO connection
object to retrieve the maximum information about an error.

But the more I work with it, the more i'm beginning to think that
working
with those two objects is a loss of time. The err object seems to have
the
same results in it than Errors object from the ADO connection. I am
really
wondering if I should only use the err object.

thanks

Message #2 by "Drew, Ron" <RDrew@B...> on Thu, 27 Jun 2002 13:31:37 -0400
........I setup a little error routine like so...
<%
On Error Resume Next
'***********************************************************************
***************
'***   Subroutine DisplayError
'***********************************************************************
***************
Sub DisplayError(Connection,errNum,errDesc,errSource,proc)
    Response.Write("<H4 align=3Dcenter> Program Message </h4>")
    Response.Write("VB Error Number: <b>" & errNum & " [0x" &
Hex(errNum) & "]</b>")
    Response.Write("<br>Err.Description: <b>" & errDesc & "</b>")
    Response.Write("<br>Err.Source: <b>" & errSource & "</b>")
    Response.Write("<br>Procedure: <b>" & proc & "</b>")
    Response.Write("<br>Connection errors: <b>" &
Connection.Errors.Count & "</b>")
    If (Connection.Errors.Count > 0) Then
       For Each ErrorMsg in Connection.Errors
           Response.Write("<br>" & ErrorMsg.Description)
       Next
    End If
End Sub
%>
.........and where the db access is like so....where cnDB is my
connection.....
If (Err.number <> 0) then
	set cnDB =3D nothing
	DisplayError cnDB, Err.Number, Err.Description, Err.Source,
"Connection"
End if
.............  Look at  http://asp-help.com/database/db_errors.asp




-----Original Message-----
From: olivier plamondon [mailto:oplamondon@t...]
Sent: Thursday, June 27, 2002 12:41 PM
To: ASP Databases
Subject: [asp_databases] pertinence of the connection error object


  I have been working in with databases via ASP for about three weeks
now, I have implanted a way of working with errors that seemed optimal
to
me. I use the err object and the Errors object from the ADO connection
object to retrieve the maximum information about an error.

But the more I work with it, the more i'm beginning to think that
working
with those two objects is a loss of time. The err object seems to have
the
same results in it than Errors object from the ADO connection. I am
really
wondering if I should only use the err object.

thanks
Message #3 by "olivier plamondon" <oplamondon@t...> on Thu, 27 Jun 2002 16:41:06
  I have been working in with databases via ASP for about three weeks 
now, I have implanted a way of working with errors that seemed optimal to 
me. I use the err object and the Errors object from the ADO connection 
object to retrieve the maximum information about an error.

But the more I work with it, the more i'm beginning to think that working 
with those two objects is a loss of time. The err object seems to have the 
same results in it than Errors object from the ADO connection. I am really 
wondering if I should only use the err object.

thanks

  Return to Index