Results 1 to 2 of 2

Thread: Custom Error Message on Duplicate Entries

  1. #1
    Lenora Guest

    Custom Error Message on Duplicate Entries

    How can I display a custom error message when the user tries to add a record that compromises the primary key? Is there a value that I can check for in the error to display my own custom text.

    Thanks in advance if anyone can help me.

  2. #2
    John Guest

    Custom Error Message on Duplicate Entries (reply)


    Hi Lenora,

    After your x.ASPdb line, just put in a check to see what the value of

    Session("SV_RecAffected_999&#34 (where 999 is your dbUnit number)

    is. If it's -1 then the Add failed and you can take appropriate action. See the docs and the section on exported session variables for more information.

    Thanks,
    John

    ------------
    Lenora at 9/25/01 2:01:24 PM

    How can I display a custom error message when the user tries to add a record that compromises the primary key? Is there a value that I can check for in the error to display my own custom text.

    Thanks in advance if anyone can help me.

Posting Permissions

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