|
-
Oct 29th, 2003, 05:06 AM
#1
Thread Starter
Hyperactive Member
delete current record
I use this code to delete the current record in my C# Project.
dataSet11.Tables["Student"].RowDeleted;
But it doesn't work. What code should I write?
-
Oct 29th, 2003, 05:12 AM
#2
RowDeleted only checks if the row was deleted (I guess).
There must be some function like Delete or DeleteRow.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 29th, 2003, 11:18 AM
#3
PowerPoster
And remember, once you delete a row in a dataset, you are only flagging it for deletion. It won't actually be deleted until you update the datasource with the dataset.
-
Oct 31st, 2003, 12:35 PM
#4
Frenzied Member
Try this.
Code:
DataRow row = dataSet11.Tables["Student"]["myColumn"];
row.Delete();
This may not be the correct code (i cant test it) but it should be similar. Get a reference o the row you want to delete then call the delete function on the row object which marks the row for deletion then update the DB.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|