Re: Access database not updated when records are deleted

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

From: Anonymouse (Anonymouse_at_discussions.microsoft.com)
Date: 11/05/04


Date: Fri, 5 Nov 2004 09:54:14 -0800

I reversed the order as Grzegorz suggested, but the record I supposedly
deleted still wouldn't stay dead. I even tried commenting out AcceptChanges -
same result. The database is definitely not read-only; the code for adding
and editing a record works. I used Debug to display the RowState for that
row, and it returned Deleted - as it should.

What, other than the usual Microsoft weirdness, is going on?

(sigh) I'll do some more research...as if I haven't done enough research
already in the course of learning VB.NET and ADO.NET. But I WILL crack this.
I do not allow code to defy me, I'm too stubborn for that. This app WILL do
what I want it to. It WILL concede my mastery. It will comply. Resistance is
futile. :)

Thanks, guys!

"Miha Markic [MVP C#]" wrote:

> Hi,
>
> Oooo, this is a classic one.
> You don't need and you shouldn't call AcceptChanges (before Update) in your
> case.



Relevant Pages

  • Re: RowState not updating
    ... Changing of the rowstate is done at a rowchange or by calling the ... I load a dataset with data, and call AcceptChanges() to set all of the ... I then set up databinding and change a value. ... call EndEdit() to possibly create more overhead when saving data? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Typed DataSet Problem
    ... command against whatever is "added". ... depend on rowstate, you'll have to make sure you've verified the rowstate ... is 100 queries, so your app or the other one, same difference. ... Otherwise no acceptchanges is necessary ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Typed DataSet Problem
    ... suggestion will work however there are alot of tables the app works with. ... > dataadapter and you want it to use the Update command. ... > sees the rowstate as added, it will use the Insert command. ... If it is already in there, Immediately call .AcceptChanges ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Run query to effect dataset only
    ... Theres no query way as such, I have to change each row ... > Because the DeteteBy command will run a TSQL DELETE command in the SQL ... > The RowState becomes Deleted after using the Delete method. ... > Deleted until you call AcceptChanges. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Typed DataSet Problem
    ... dataadapter and you want it to use the Update command. ... sees the rowstate as added, it will use the Insert command. ... If it is already in there, Immediately call .AcceptChanges ...
    (microsoft.public.dotnet.framework.adonet)