hi i'm having a problem regarding sql deleteCommand..
can someone please help me solve this problem coz it takes a lot of time for me to figure it out..
here's my code
Private Sub btnDeleteBC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeleteBC.Click
If MessageBox.Show("Do you really want to Delete this Record?", _
"Delete", MessageBoxButtons.YesNo, _
MessageBoxIcon.Warning) = DialogResult.No Then
MsgBox("Operation Cancelled")
Exit Sub
End If
da.DeleteCommand = New SqlCommand("DELETE FROM Blood_Chemistry WHERE BC_Form_ID= @BC_Form_ID", cs)
cs.Open()
da.DeleteCommand.ExecuteNonQuery()
cs.Close()
ds.Clear()
da.Fill(ds)
End Sub