|
-
May 24th, 2005, 08:44 AM
#1
Thread Starter
New Member
Difficulty Updating Dataset
Hi Guys, i was wondering if anyone can spot my mistake for this one.. I can delete the any row i choose in the datagrid however the changes is not being reflected in either the datset/database. Thanks
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
Dim Response As DialogResult
Dim dsDeletedRows As DataSet
dsDeletedRows = DsFileStorage1.GetChanges(DataRowState.Deleted)
Response = MessageBox.Show("Confirm Delete Record?", "Delete Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
Select Case Response
Case DialogResult.Yes
If (Me.BindingContext(DsFileStorage1, "Disk").Count > 0) Then
Me.BindingContext(DsFileStorage1, "Disk").RemoveAt(Me.BindingContext(DsFileStorage1, "Disk").Position)
odbdaFileStorage.Update(dsDeletedRows)
End If
Case Else
Return
End Select
End Sub
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
|