T
Tina
I have a SQLDataAdapter created with the wizard and having all of the
commands including the DeleteCommand - I used the defaults.
To delete a record, this works just fine:
myDA.SelectCommand.Parameters("@mykey").Value = mykey
myDS.Clear()
myDA.Fill(myDS)
If myDS.mytable.Rows.Count > 0 Then
myDS.mytable.Rows.Item(0).Delete()
myDA.Update(myDS)
End If
However, it seems that I should be able to do this in a more straightforward
manner using the DeleteCommand. How should this be done with a minimum of
code?
thanks,
T
commands including the DeleteCommand - I used the defaults.
To delete a record, this works just fine:
myDA.SelectCommand.Parameters("@mykey").Value = mykey
myDS.Clear()
myDA.Fill(myDS)
If myDS.mytable.Rows.Count > 0 Then
myDS.mytable.Rows.Item(0).Delete()
myDA.Update(myDS)
End If
However, it seems that I should be able to do this in a more straightforward
manner using the DeleteCommand. How should this be done with a minimum of
code?
thanks,
T