Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

asp error - redirect page

New Here ,
Jun 30, 2010 Jun 30, 2010

Copy link to clipboard

Copied

Hi Everyone,

I have created a simple booking form.

Everything works fine -  but one customer emailed me saying they received an error when they clicked submit. I have thoroughly tested the form and even sumitted the same details that customer entered and did not have any errors.

Could this be because of the traffic on the website? (there have been hundreds of bookings within a few days)

Rather than a error message appearing - how can I redirect the page to a message that says 'try again in a few mintues?'

Not sure where to put the redirect code.

This was the error message the received:-

Microsoft OLE DB Provider for SQL Server error '80040e14'

Incorrect syntax near 'm'.

/marketing.asp, line 24

I am so certain I have no errors in my script. I am using asp.

Hope someone can help!

Thanks in advance

TOPICS
Server side applications

Views

1.0K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 01, 2010 Jul 01, 2010

Classic ASP does not have good custom error handling, but it can be done. You'll need to use the 'On Error Goto' statement and examine the SQL connection error code - then redirect to an appropriate message page.

Votes

Translate
LEGEND ,
Jun 30, 2010 Jun 30, 2010

Copy link to clipboard

Copied

Can you post the code of the page that contained the error and identify line 24?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 01, 2010 Jul 01, 2010

Copy link to clipboard

Copied

hi there

line 24 is:-

conn.execute(SQLTemp)

the line before that is:-

SQLTemp = "INSERT INTO booking (firstname, surname, email, phone, gender, company_name, address1, address2, address3, town, postcode) values ('" & firstname & "','" & surname & "','" & email & "','" & phone & "','" & gender & "','" & company_name & "','" & address1 & "','" & address2 & "','" & address3 & "','" & town & "','" & postcode & "'')"

Its weird as we've had bookings come through fine. So i thought that having a 'try again' message would be appropriate rather than an error message.

Any ideas?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 01, 2010 Jul 01, 2010

Copy link to clipboard

Copied

Classic ASP does not have good custom error handling, but it can be done. You'll need to use the 'On Error Goto' statement and examine the SQL connection error code - then redirect to an appropriate message page.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2010 Jul 02, 2010

Copy link to clipboard

Copied

LATEST

haven't had any problems since - may have been a one off. Hope it stays that way!

Thank you very much for your help

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines