Click here to Skip to main content
11,496,146 members (358 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
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
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
Thanks Vipin,

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

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 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600

Advertise | Privacy | Mobile
Web01 | 2.8.150520.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