Save Filtered record problem

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

I got a dataset to be udpated. However, I need to filter some record first.
E.g gljnheader.approval = "Y"
I know I can use dataview to filter some record, but I don't know how to
write the coding , Please help
If dsList.HasChanges() Then
daList.Update(dsList, "gljnheader")
dsList.AcceptChanges()
End If
 
Agnes,

You cannot use the dataview to do an update.

However one of the overloaded methods of the dataadapter update allows you
to use a datarowcollection (don't forget to specify the table name in the
second parameter)
http://msdn.microsoft.com/library/d...mdatacommondbdataadapterclassupdatetopic4.asp

Therefore you can select those using the datatable.select *method*
http://msdn.microsoft.com/library/d.../frlrfsystemdatadatatableclassselecttopic.asp

And than update those.

I never did this, however would not see why not.

I hope this helps, and tell please if it did (or not what I don't expect).

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top