G
Guest
Hello,
....
Dim DA As SqlDataAdapter, DS As DataSet, curPos As Integer
Dim cmdSel, cmdIns, cmdDel As SqlCommand
....
DA = New SqlDataAdapter()
....
-----------------------this part works fine--------------------
conn1.Open()
strSqlDel = "Delete From tbl1 Where rowID = 10"
cmdDel = New SqlCommand(strSqlDel, conn1)
cmdDel.ExecuteNonQuery()
-----------------------------------------------------------------
---------but this one doesn't work - what am I missing for the
dataAdapter?----------
conn1.Open()
strSqlDel = "Delete From tbl1 Where rowID = 10"
cmdDel = New SqlCommand(strSqlDel, conn1)
DA.DeleteCommand = cmdDel
DA.Update(DS, "tbl1")
----------------------------------------------------------------------------
I look in Query analyzer and row 10 is still there when I try to delete it
with the DataAdapter. I can delete row 10 with the sqlCommand no problem.
What am I missing with the dataAdapter?
Thanks,
Rich
....
Dim DA As SqlDataAdapter, DS As DataSet, curPos As Integer
Dim cmdSel, cmdIns, cmdDel As SqlCommand
....
DA = New SqlDataAdapter()
....
-----------------------this part works fine--------------------
conn1.Open()
strSqlDel = "Delete From tbl1 Where rowID = 10"
cmdDel = New SqlCommand(strSqlDel, conn1)
cmdDel.ExecuteNonQuery()
-----------------------------------------------------------------
---------but this one doesn't work - what am I missing for the
dataAdapter?----------
conn1.Open()
strSqlDel = "Delete From tbl1 Where rowID = 10"
cmdDel = New SqlCommand(strSqlDel, conn1)
DA.DeleteCommand = cmdDel
DA.Update(DS, "tbl1")
----------------------------------------------------------------------------
I look in Query analyzer and row 10 is still there when I try to delete it
with the DataAdapter. I can delete row 10 with the sqlCommand no problem.
What am I missing with the dataAdapter?
Thanks,
Rich