Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update of foreign key

Status
Not open for further replies.

cards4

Technical User
Dec 9, 2004
38
US
Hello,
Yesterday, I posted a question concerning UPDATE. The solution presented to me was helpful, however, a new error has occurred. This is my query:

update table set emp_id='???', empno='???', soc_sec_no='???'
where (soc_sec_no='???' and emp_id='???' and empno='???')

When I run this query, I get the following error:
UPDATE statement conflicted with TABLE REFERENCE constraint 'R_195'. The conflict occurred in database '???', table 'table1'.
The statement has been terminated.

I'm not entirely sure what this error message is saying. Please help. Thanks.

The ??? represents data and is not in my actual query.
 
That mean you have a relation between table you want to update and some other table and you want to set the values for one (or more) field(s) and that value does not exists in parent table. Check R_195 constrain to see in what field you didn't put the right value.

Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
MVP VFP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top