Select and edit records based on filtered child field

GaryS

Member
Joined
Sep 30, 2008
Messages
7
Programming Experience
3-5
I have two data tables in an Access database. Using the Northwind data walkthrough database sample, I show the customer information from the parent (Customers) table and related fields from the child (Orders) table on a form. The CustomersTableAdapter.Fill is used to fill the form and related data is filled by the OrdersTableAdapter.Fill method.

I want to be able to select records filterd by the ShipVia field in the child (Orders) table where the ShipVia field matches a certain value. I can do this using a FillBy query in the CustomersTableAdapter by adding the Orders table to the query, but the resulting dataset is read only and the records cannot be edited.

Is there a way to do this and allow for editing of the selected records?

Thanks.
 
For some reason this seems confusing....

From what I can make out of it, it appears that you opened one dataset and deadlocked the records which are blocking you from your editing.
 
Is there a way to do this and allow for editing of the selected records?

ordersBindingSource.Filter = "[ShippedVia] LIKE '*Amsterdam*'"
For some reason this seems confusing....

From what I can make out of it, it appears that you opened one dataset and deadlocked the records which are blocking you from your editing.

No, it's simply that by default a 1:M join view cannot be updated because the primary key of one of the participating tables is not preserved

For more info, google "key preserved join"
 

Latest posts

Back
Top