csharp_boy
Member
- Joined
- Feb 5, 2006
- Messages
- 5
Hi
Say i have two tables in Access
Order and Order_Items where Order is the parent and Order_Item is the child and it is linked by the columns order_ID.
order_ID in the Order table is the primary key and done by autonumbering whilst order_ID in the Order_Items is a foreign key.
my problem is this. i have both tables and schemas put onto a dataset, where i create new rows, but i do not assign an order_ID for any of the rows i create because Access would autonumber them when i call an Update.
The problem is that how do i link Order_Items record with Order record in the dataset? would i have to update the database every time i create an Order record in order to get assigned an order_id before i can then create child items in the Order_Item table that link to this order_ID or is there some sort of feature in ADO.NET that allow you to link two records together without having to assign a value to the linking columns?
Thanks.
Say i have two tables in Access
Order and Order_Items where Order is the parent and Order_Item is the child and it is linked by the columns order_ID.
order_ID in the Order table is the primary key and done by autonumbering whilst order_ID in the Order_Items is a foreign key.
my problem is this. i have both tables and schemas put onto a dataset, where i create new rows, but i do not assign an order_ID for any of the rows i create because Access would autonumber them when i call an Update.
The problem is that how do i link Order_Items record with Order record in the dataset? would i have to update the database every time i create an Order record in order to get assigned an order_id before i can then create child items in the Order_Item table that link to this order_ID or is there some sort of feature in ADO.NET that allow you to link two records together without having to assign a value to the linking columns?
Thanks.