Primary key violation usually means that U are trying to enter or insert a value that already exist in the primary key field, there is nothing wrong I see in the code, Primary keys have to be unique
Some people get so rich they lose all respect for humanity. That's how rich I want to be.