Error handling

Results 1 to 2 of 2

Thread: Error handling

  1. #1
    Join Date
    Dec 1969

    Default Error handling

    Hi guys and gals<BR><BR>I have a receipt.asp page that when the user clicks the back button, they get an error from the process.asp page because it tries to insert the same unique orderId again.<BR><BR>The error message is:<BR><BR>Microsoft JET Database Engine error &#039;80040e14&#039; <BR><BR>Syntax error in INSERT INTO statement. <BR><BR>My question is, is there a way to catch this error in the ASP on the process.asp page, and redirect them back to the previous receipt page?<BR><BR>PS the receipt page URL string has variables passed in it so I&#039;d need to get back there with the same variable values.<BR><BR>Thanks<BR>Don

  2. #2
    Join Date
    Dec 1969

    Default I suppose there are two ways...

    ...of doing this.<BR><BR>1.) Before you insert into the database, run another query to check whether the record already exists.<BR><BR>2.) Use ON ERROR RESUME NEXT and then check for errors. See link to VBScript Reference on the left.<BR><BR>Oliver.

Posting Permissions

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