Link to home
Start Free TrialLog in
Avatar of ekenman
ekenman

asked on

Master / Detail form generates FK error upon save when both master and details contains new records

I'm having a typical OrderForm with Order details in a datagridview like in the Northwind DB.

I create a dataset containing Order and Orderdetails.

I drag detils from Order and a gridviw from orderdetails under order.

When I run it, it works fine until I create a new order and enters order details. The temporary orderno -1 creates a foreign key error in orderdetails when I save. I thought the table adapter would take care of this for me?

Any suggestions?

ASKER CERTIFIED SOLUTION
Avatar of ekenman
ekenman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial