Results 1 to 8 of 8
  1. #1
    Join Date
    May 2007
    Posts
    7

    Unanswered: ORA-00001: Primary Key constraint (POP.POPSERV) violated

    Hello ,

    I am succesfully got the messages through one of the test form application. The messages I am getting over the net from different popservers.

    I created two tables for storing these messages.

    POPSERVER(Pop3server varchar2(200) Pk)
    PopReaders(num,subject,mfrom,mdate,pop3server,text )


    There is a master detail relation ship I applied in order to get and store messages.
    Pop3server is the primary key in table PopServer and it is also the foreign key in table PopReaders, so the relationship b/w two tables works.

    First time when I enter the Pop3server name (pop.bluebottle.com) and click the get messages its ok and display all the messages on forms as well as when I save these messages, they stores successfully.

    But next time when I enter the same existing Ppo3server(pop.bluebottle.com) on form's screen box and press get messages in order to get new messages, its ok all the new messages comes, but when I go to stoe these messages the following error come:

    INSERT INTO POPSERVER(POP3SERVER) VALUES (:1)
    ORA-00001: Primary Key constraint (POP.POPSERV) violated


    How can we avoid this so when we go to enter the new messages of the existing pop3server it only add its detail information into the Popreaders table? Please give a solution.


    Thanks

    Mir

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    The only person who can help you is you.
    We (TINW) can not fix your PK violations.
    The fix is to not try to INSERT duplicate key values.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2007
    Posts
    7
    Ok, I will help me, but can you please point out how can we resolve this issue in order to avoid this error.


    PJMIR

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    > how can we resolve this issue in order to avoid this error.
    The fix is to not INSERT duplicate key values.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    May 2007
    Posts
    7
    Quote Originally Posted by anacedent
    > how can we resolve this issue in order to avoid this error.
    The fix is to not INSERT duplicate key values.

    BUt Bharwae what piece of code I add in order to do that could u plz mention?

    PJMIR

  6. #6
    Join Date
    Feb 2007
    Location
    Bratislava, Slovakia
    Posts
    85
    write simple procedure with predefined exception dup_val_on_index

  7. #7
    Join Date
    May 2007
    Posts
    7
    BUt Bharwae what piece of code I add in order to do that could u plz mention?

  8. #8
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'll tell you the code as soon as you start speaking English instead of this garbage language you are using.

Posting Permissions

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