Click here to Skip to main content
Rate this: bad
good
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
this.dataSetDataTableFromDBBindingSource.EndEdit();
this.Validate();
this.adapter.Update(this.custtb);
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
v2
Rate this: bad
good
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
 
regards
Vipin Kumar
  Permalink  
Rate this: bad
good
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.
 
Nishitha
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hope this[^] might give you an idea.
  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 15 Feb 2011
Copyright © CodeProject, 1999-2014
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