[Mono-devel-list] ADO.NET and DataRow.AcceptChanges();

Eran Domb erand at mainsoft.com
Mon Nov 10 02:21:59 EST 2003


Hi
After you do AcceptChanges() the row state become Unchanged so when you
do Update() the DataAdapter will not update the database because the
state is unchanged. The flow should be: Fill DataSet from DataAdapter,
make changes on the rows (modify, delete) and then update the database
throw the DataAdapter (without doing AcceptChanges()). The only rows
that will be updated to the database are those that their state is
Modify or Deleted.


-----Original Message-----
From: mono-devel-list-admin at lists.ximian.com
[mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of
yoros at wanadoo.es
Sent: Sunday, November 09, 2003 11:05 PM
To: Daniel Morgan
Cc: mono-devel-list
Subject: Re: [Mono-devel-list] ADO.NET and DataRow.AcceptChanges();

On Sun, Nov 09, 2003 at 03:22:11PM -0500, Daniel Morgan wrote:
> I don't know the answer, but I will guess for you...
> 
> Does the adapter have a command object for deleting the row?
> 

The adapter uses CommandBuilder to build the needed command, but that's
not the question. I'm talking about the AcceptChanges() and Update().

Regards,

    Pedro

-- 
Pedro Martínez Juliá
\  yoros at terra.es
)|    yoros at wanadoo.es
/        http://yoros.dyndns.org
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org
GnuPG public information:  pub  1024D/74F1D3AC
Key fingerprint = 8431 7B47 D2B4 5A46 5F8E  534F 588B E285 74F1 D3AC
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list