Re: Update database using DataAdapter for DataSet populated from XML file?

Tech-Archive recommends: Fix windows errors by optimizing your registry



If the dataset is serialized with the diffgram, then the rowstate of each
row will be in tact and provided that's how you want it in the end database,
then you can just configure an adapter an call Update passing in the
dataset. If the state is different, then just loop through row by row and
update each row manually (which is all the adapter does under the hood).

HTH,

Bill
"NorCan" <NorCan@xxxxxxxxxxxx> wrote in message
news:eDnOOjAyFHA.3152@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have an XML file with data which I am reading into a dataset. I want to
> make changes to a table in my database based on values from the dataset.
> These changes can include updates, inserts and deletes.
>
> I would like to use a DataAdapter (odbc) to do the update.
>
> However, my dataset was not filled using the DataAdapter... how can I make
> use of the DataAdapter to update the datasource in this scenario?
>
>
> Regards,
> Frode


.



Relevant Pages

  • Re: Need confirmation on Adapter object ??
    ... > The m_dsReel dataset is populated by the Fill method of the Adapter, ... > database we call the Update method that will execute the proper UPDATE, ... You have to pass an instance of dataset or datatable to Update method. ... One dataadapter can update one table at a time. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How to flush DataSet data back to the database
    ... Well, it's not really faster, because the wizard is hiding a lot of stuff, ... doesn't mean that the adapter knows what to do with the data in the dataset. ... > I didn't tell that I load DataTable with data from an Oracle database by ... >> DataAdapter and pass it the dataset, and it should be able to update. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: HELP! Im a newbie.. :) MySQL Connector Problem (.NET)
    ... > build a web application using vb .NET to access data in a MySQL database ... > I am using a dataAdapter and am filling it with a dataset ... > the data reading part (getting data from the database, ... > concurrency issues and the adapter is not throwing any errors.. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Transfering DataSet to the dataBase
    ... the same data set to the Update method on the DataAdapter, ... > i would like to know plz how can i send my dataSet to the dataBase, i'm> writing in C# and my dataBase is SQL Server. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Datasets - what is the best approach?
    ... I seem to still be struggling with the best place to declare the DataAdapter ... > I try to retrieve only the data that is currently relevant to the task at hand. ... Crystal report projects with master/detail type ... It accesses data in an SQL Server database. ...
    (microsoft.public.dotnet.languages.vb)