G
Guest
I have a classic scenerio - simliar to the Northwind
Customer/Ordes/OrderDetails. I want to select a customer from a combo box,
display pertinent info, and display in a hierarchical datagrid the orders and
ordertails (in to next layer). I am creating 3 dataadapters, one for each
table. I am creating the customers as a parameter query which I pass the ID
value from the combo box to the query and it pulls up the custumer info
nicely.
Howerver, I can make the Orders dataadapter a parameter query using the
cutomer ID, but can't drill down to the Orders detail using that same ID.
I've put all three dataadapters into one dataset establishing the
relationships.
When I run it, I get an error saying that All the rows can't find related
rows. I know what is happening - it is pulling all the rows from subordinate
table and there is not related records in parent tables, thus violating the
referential integrity of the database.
It will work if I set constraints to false, but I can then not update
subordinate tables.
How can I make this classic senerio work - using winforms in vb.net????
It seems to me that there should be a way to force pulling the only the
orders and orderDetails associated with the customer.
Thanks for your help.
Customer/Ordes/OrderDetails. I want to select a customer from a combo box,
display pertinent info, and display in a hierarchical datagrid the orders and
ordertails (in to next layer). I am creating 3 dataadapters, one for each
table. I am creating the customers as a parameter query which I pass the ID
value from the combo box to the query and it pulls up the custumer info
nicely.
Howerver, I can make the Orders dataadapter a parameter query using the
cutomer ID, but can't drill down to the Orders detail using that same ID.
I've put all three dataadapters into one dataset establishing the
relationships.
When I run it, I get an error saying that All the rows can't find related
rows. I know what is happening - it is pulling all the rows from subordinate
table and there is not related records in parent tables, thus violating the
referential integrity of the database.
It will work if I set constraints to false, but I can then not update
subordinate tables.
How can I make this classic senerio work - using winforms in vb.net????
It seems to me that there should be a way to force pulling the only the
orders and orderDetails associated with the customer.
Thanks for your help.