如下代码:
Dim cmd As New SQLCommand
cmd.ConnectionName = Mydata
cmd.CommandText = "select * from {事务提醒}"
Dim dt As DataTable = cmd.ExecuteReader(True)
Dim dr As DataRow = dt.Find("单据名称 = '" & Mtb & "' and 单据编号 = '" & pr(Idcol) & "'")
If dr IsNot Nothing Then
msgbox(1)
dr.delete()
End If
dt.save()
End If
删除时总提示"找不到名称为“”的datatable!"
是不是不能通过删除临时表中的行来实现删除实际表中的行的作用?
谢谢!