Results 1 to 18 of 18

Thread: error at save in to 2 tables they have relationship one-to-many

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2011
    Location
    saudi arabia
    Posts
    37

    Question error at save in to 2 tables they have relationship one-to-many

    hi all

    I have 2 tables Customers and Orders it have relationship one-to-many and i set the cascade between tables. i add both tables to one form and i set EndEdit event to the CustomerBindingSource owing to Saves the new record in Customers before save new record to the Orders but i receives error :
    A foreign key value cannot be inserted because a corresponding primary key value does not exist.
    I did no know what is wrong !




    ErrorSave.zip
    Last edited by ebrahim; Dec 13th, 2012 at 10:31 PM.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width