Click here to Skip to main content
11,922,320 members (39,272 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# table
I have created a dataset for my table tbl_Cust.In code created a tableadapter object adapter n a typed datatable custtb.then i have inserted 2 rows, updated 2 rows and deleted 2 rows in my datatable custdb thru code.
then i called adapter.Update(custtb) to update same in my DB.
Inserted&Updated records are reflecting in DB. But the deleted one are not actually removed from DB.

The code for DB update is like
my delete command of adapter is correct.I cant use delete method of adapter and delete each rows as i wanna do it in bulk.
Anyone idea on where it goes wrong?????
Thanks in advance
Posted 10-Feb-11 20:53pm
Edited 10-Feb-11 20:56pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Der Friend
If there is any relation ship then it may cause problem(hope you know).
If you are using stored procedure to perform operation then check the stored procedure so that the comparison is correct or not

Vipin Kumar
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Thanks Vipin,

But Im using direct SQL command, not a SP. Also there is no relationship as my dataset stands for a single table.

Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Hope this[^] might give you an idea.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 493
1 Dave Kreskowiak 285
2 Sergey Alexandrovich Kryukov 243
3 Richard MacCutchan 155
4 ppolymorphe 135
0 OriginalGriff 7,231
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,356
3 George Jonsson 2,865
4 Suvendu Shekhar Giri 2,216

Advertise | Privacy | Mobile
Web03 | 2.8.151120.1 | Last Updated 15 Feb 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100