Problem saving table with filtered data

shags_j

Member
Joined
Jan 31, 2010
Messages
6
Programming Experience
Beginner
Hi All,

I have a program that has datagrid (bound to an access database). It filters on opening based on some dates in a combo box.

Now when I use the fillby(...) It filters the data ok however the save procedure (updateall) just doesn't want to work for me.

Any ideas why?

Do I need to remove the fill by before saving?

Am writing in vb .net 2008 expres.

Cheers,

J
 
Sorry was just asking general.

However:

I am using the standard coding for the databound grids

Me.Validate()
Me.LbDataBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.LogbookDataSet)


the dataset is filtered.

When I fill the datagrid with no filter then the data saves however if I put a filter in it won't save.
 
When you say "filter" do you mean you have created a query on the dataTable like "Select * FROM Customers WHERE CustomerID = @CustomerID"

I thought that when you do queries like that it doesn't create Update code as they are "read only" ... hence why loading ALL works.

I might be wrong, but remember postings on here ages ago (and I mean years ago) about it.


EDIT: I don't use VS2008 but just found this:
The TableAdapterManager provides a hierarchical update for a dataset via the UpdateAll function however you must set the its TableAdapter property for each table you wish to be updated. Forget to set one and that table simply does not get updated. In our environment this entails creating a TableAccessor in the DataSet project.
 
Back
Top