Updating a table with primary keys

Results 1 to 2 of 2

Thread: Updating a table with primary keys

  1. #1
    Join Date
    Dec 1969

    Default Updating a table with primary keys

    When I try to update a particular table, I get the following error: You cannot add or change a record because a related record is required in table &#039Employees&#039. I think it is related to the primary keys I have setup in the table. What do I do? How do I tell the system how to deal with the primary keys (one to many relationship). The table that I want to write to is referencing an auto-number field in the Employee table.

  2. #2
    Join Date
    Dec 1969

    Default RE: Updating a table with primary keys

    Sounds like you have a issue with referential integrity being enforced on your relationship. You can&#039t add or update a record in your table without there being a "master" record in the Employee table. This "master" record keeps the "many" part of the relationship referenced correctly to the "one" part. I&#039m just starting out with ASP so I really don&#039t have an adequate solution but it&#039s a database issue. you&#039ll need to create a reference to the record in the Employee table first.<BR><BR>Hope this helps somewhat<BR><BR>Paul

Posting Permissions

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