hi..i have 2 tables client and user and between them it's a relationship 1:1 and i'm trying to insert a new client but i get the error: the insert statement conflicted with the foreign key constraint "FK_client_user"...etc i understand why, but i don't know how to solve it. i've thought that first i should introduce a blanc row in each table then replace the values..but i don't know how to implement that, another solution? pls i need some help.
the tables structure is:
client(client_id(pk), user_id(fk), client_type etc)
user(user_id(pk), client_id(fk), password, email)
Loading


Arul Manivannan48 reputationPosted Mar 21, 2013, 5:22 AM EDT
The column name user_id in Client TABLE is unnecessary. So remove that column first.
Arul Manivannan
Violeta Popa132 reputationPosted Mar 21, 2013, 6:19 AM EDT
Arul Manivannan48 reputationPosted Mar 21, 2013, 11:30 PM EDT
Harekrushna Parida7 reputationPosted Mar 21, 2013, 11:55 PM EDT
If that key is not present in mapped table then this error usually throws by system
Harekrushna Parida7 reputationPosted Mar 21, 2013, 11:55 PM EDT
If that key is not present in mapped table then this error usually throws by system
Harekrushna Parida7 reputationPosted Mar 21, 2013, 11:55 PM EDT
If that key is not present in mapped table then this error usually throws by system