DataAdapter Update

  • Thread starter Thread starter Doug Bell
  • Start date Start date
D

Doug Bell

Hi,
I think that I have misunderstood the Update method of DataAdapters.


I thought that having made a Connection, Added some SQL to a Command Object
(OleDbCommand)and then creating the DataAdapter and filling a Table in a
DataSet that I could refresh the data in the DataSet Table using the Update
Method of the DataAdapter.

This doesn't work for me, I may be doing it incorrectly.

Can you use the Update Method of a DataAdpter to refresh a DataSet's
DataTable or is it solely used for updating the DataBase Table using a
Deltagram?

Thanks

Doug
 
"Doug Bell" <dug@bigpond>>

Can you use the Update Method of a DataAdpter to refresh a DataSet's
DataTable or is it solely used for updating the DataBase Table using a
Deltagram?
It is to update the database using a datatable or a datatable inside a
dataset.
And in the same time doing the acceptchanges in the datatable that is used
when it went right.

A dataset is basicly nothing more than an object that holds references to
datatables and relations between them.

I hope this helps?

Cor
 
Can you use the Update Method of a DataAdpter to refresh a DataSet's
DataTable or is it solely used for updating the DataBase Table using a
Deltagram?

Yes, you can update the dataset only - just don't create a
UpdateCommand/DeleteCommand/SelectCommand for the data adapter.
 
Thanks
I see where I was going wrong, I was using:
daMyDataAdapter.Update(dsMyDataSet)

instead of

daMyDataAdapter.Update(dsMyDataSet, "MyTable")

Also sorry for the double post, I could not find my posts until just now,
the News Group (or maybe my news reader) pushed them as replies to
"Re: DataAdapter Update" sent by Darrel and I was expecting them to come up
as new posts.

Thanks Doug
 

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