Re: How to Sinchronize a DataGridView with a database.

From: Val Mazur (group51a_at_hotmail.com)
Date: 10/27/04


Date: Tue, 26 Oct 2004 21:44:57 -0400

Hi,

Update method of the DataAdapter should do it for you. If it does not, then
most likely you call AcceptChanges before calling update or you did not
define proper INSERT/UPDATE/DELETE commands for your DataAdapter

-- 
Val Mazur
Microsoft MVP
"Autumn" <sorrowforsorrow@yahoo.com> wrote in message 
news:uxPRxp3uEHA.2624@TK2MSFTNGP11.phx.gbl...
>
> How do i send back the changes to a
> DataGridView connected to a sql database?
>
> What message shoud i send to my xxxTableAdapter or xxxDataConnector?
> I try the following but the content of my database remains unchanged:
>
> this.entriesDatesTableAdapter.Update(this.earth.EntriesDates);
>
> ("earth" is the DataSet created from the database).
>
>
> I should be grateful if You could help me.
>
> 


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: update data in datagrid
    ... If the DataSet was populated from a database using a DataAdapter, ... you call the DataAdapter's Update method it will know which rows are ... > I mean is there any way I can let datagrid know which row/columnhas ... > modified and update them at database? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to flush DataSet data back to the database
    ... I didn't tell that I load DataTable with data from an Oracle database by ... I tried using Update method of the generated data ... I agree with you that if I want to learn ADO.NET I should get rid of wizard ... > DataAdapter and pass it the dataset, and it should be able to update. ...
    (microsoft.public.dotnet.framework.adonet)
  • Need a suggestion for ADO please
    ... I use visual basic .net 2003 and develop database application based on MS ... I create new record/s by the .NewRow method of the dataset object and ... I save the changes to the database by the .update method of the ... dataadapter. ...
    (microsoft.public.dotnet.general)
  • 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)