error handling

Results 1 to 2 of 2

Thread: error handling

  1. #1
    Join Date
    Dec 1969

    Default error handling

    guys I have this line of code:<BR><BR>Set rs = Conn.Execute(SQLStmt)<BR><BR>sometimes a user will not be able to execute this so:<BR>a Permission denied. error is sometimes can I handle this error? case of the error redirect back to my login page

  2. #2
    Join Date
    Dec 1969

    Default RE: error handling

    &#060;%<BR>...<BR>rs = "oops"<BR>On Error Resume Next<BR>Set rs = Conn.Execute(SQLStmt)<BR>On Error GoTo 0<BR>If rs = "oops" Then<BR> Response.Redirect "tryagain.asp"<BR>End If<BR>...<BR>%&#062;<BR><BR>Various other ways to do it, but that&#039;s clean and simple. Just be sure to limit the use of ON ERROR to as few lines as possible. As I did there, limiting it to just one line.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts