13063154
Member
Hi
I am trying to set a delete statement to remove a student from a SQL server database. My statement is as follows:
(It reads the data into a datagrid and then the user can select the line in the datagrid and then choose delete button)
Case "Delete"
Try
Dim row As DataRow
row = GetCurrentRow()
If Not IsNothing(row) Then
row.Delete()
Me.Changed = True
End If
Catch ex As Exception
oEx.Handle(ex, Dev.[Shared].Common.ExceptionDev.SeverityTypes.Critical, Me.GetType.ToString, "tbBase_ButtonClick")
End Try
Is this correct? What am i doing wrong it deletes the student from the data grid but when i go back into the app. or click refresh it brings the student that was deleted back.
I am trying to set a delete statement to remove a student from a SQL server database. My statement is as follows:
(It reads the data into a datagrid and then the user can select the line in the datagrid and then choose delete button)
Case "Delete"
Try
Dim row As DataRow
row = GetCurrentRow()
If Not IsNothing(row) Then
row.Delete()
Me.Changed = True
End If
Catch ex As Exception
oEx.Handle(ex, Dev.[Shared].Common.ExceptionDev.SeverityTypes.Critical, Me.GetType.ToString, "tbBase_ButtonClick")
End Try
Is this correct? What am i doing wrong it deletes the student from the data grid but when i go back into the app. or click refresh it brings the student that was deleted back.