Re: Access database not updated when records are deleted
From: Anonymouse (Anonymouse_at_discussions.microsoft.com)
Date: 11/05/04
- Next message: Nilesh: "ADO.NET and ODBC { CALL ..... } Syntax"
- Previous message: Angelos Karantzalis: "Declarative Data Access"
- In reply to: Anonymouse: "Re: Access database not updated when records are deleted"
- Next in thread: Anonymouse: "Re: Access database not updated when records are deleted"
- Reply: Anonymouse: "Re: Access database not updated when records are deleted"
- Reply: Miha Markic [MVP C#]: "Re: Access database not updated when records are deleted"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 5 Nov 2004 11:20:02 -0800
Okay. I am now officially living in Weirdsville, Microsoftland.
To explain: I looked up OleDbCommandBuilder in Help, and I tried explicitly
creating a Delete command as shown. It STILL didn't work, so I commented it
out and tried single-stepping through the code, trying to figure out what
was/wasn't happening...
...and it worked. THE RECORD I WAS TRYING TO DELETE *WAS* DELETED!
After I'd retrieved my jaw from the floor and glued it back into place, I
decided to test this new, baffling event just to confirm it really WAS
happening and I hadn't lost what remains of my mind. I deleted the database
and replaced it with the unpopulated copy I keep as required by the terms of
my MCAD assignment. I added a few records; no problem. I edited one or two;
all changes were written to the database witthout a hitch. So far so good.
I tried deleting one. It was deleted.
Essentially the code is as it was before I tried creating an explicit Delete
command (although I've discovered that AcceptChanges is indeed unnecessary).
So why the f*** is it working now when it didn't before?! Why is the damn
code now looking back nonchalantly at my baffled face as if to say: 'What?'
?! What IS it with these damn apps?!
Oh well. At least it works now, and I can get on with creating the rest of
the app. Thanks for the help, troops!
- Next message: Nilesh: "ADO.NET and ODBC { CALL ..... } Syntax"
- Previous message: Angelos Karantzalis: "Declarative Data Access"
- In reply to: Anonymouse: "Re: Access database not updated when records are deleted"
- Next in thread: Anonymouse: "Re: Access database not updated when records are deleted"
- Reply: Anonymouse: "Re: Access database not updated when records are deleted"
- Reply: Miha Markic [MVP C#]: "Re: Access database not updated when records are deleted"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|