DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Can I change ORA-00001:unique constraint...?

  1. #1
    Join Date
    Jul 2002
    Posts
    228

    Can I change ORA-00001:unique constraint...?

    hi,
    I've table ST
    NAME.........VARCHAR2(20)........PRIMARY KEY
    ID..............NUMBER

    INSERT INTO ST VALUES('PTS', 2);
    INSERT INTO ST VALUES('PTS', 2);

    I get (correctly) error ORA-00001:unique constraint (X_PK_Y) violated.

    Can I change this message of error??

    For example, can I get this error when I insert 2 primary key:

    wrong: change your value please!



    Thanks
    Raf

  2. #2
    Join Date
    May 2001
    Location
    Atlanta US
    Posts
    262
    First of all that is an Oracle system error.
    Why would you want to change the text of the message?

    Are you trying to provide a customized message to the end user?
    Hemant

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Look at exception handling.
    Jeff Hunter

Posting Permissions

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


Click Here to Expand Forum to Full Width