Error Question

Discussion in 'ASP General' started by Mangler, Oct 24, 2008.

  1. Mangler

    Mangler Guest

    Lets say I have a page where a user can update their profile
    information. In the DB table the username field has a unique
    constraint on it to keep username from repeating. If the user changed
    their username to something that already existed in another record in
    that table sql will throw an error. That also means that IIS will
    give an error page.

    I was wondering how I can keep the user on the same page but display
    the SQL error message somewhere on the page.
     
    Mangler, Oct 24, 2008
    #1
    1. Advertising

  2. Mangler

    Evertjan. Guest

    Mangler wrote on 24 okt 2008 in microsoft.public.inetserver.asp.general:

    > Lets say I have a page where a user can update their profile
    > information. In the DB table the username field has a unique
    > constraint on it to keep username from repeating. If the user changed
    > their username to something that already existed in another record in
    > that table sql will throw an error. That also means that IIS will
    > give an error page.
    >
    > I was wondering how I can keep the user on the same page but display
    > the SQL error message somewhere on the page.
    >


    Read up about:

    On Error Resume Next
    On Error GoTo 0



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Oct 24, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hfk0
    Replies:
    2
    Views:
    21,706
  2. JavaQueries
    Replies:
    1
    Views:
    3,710
    John C. Bollinger
    Mar 1, 2005
  3. Balaji
    Replies:
    3
    Views:
    10,140
  4. Bishop
    Replies:
    1
    Views:
    807
    Bishop
    Feb 24, 2007
  5. juvi
    Replies:
    3
    Views:
    1,065
    Alexey Smirnov
    Jan 22, 2009
Loading...

Share This Page