以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  通过删除临时表行来更新数据总出错  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=42417)

--  作者:zpx_2012
--  发布时间:2013/11/11 14:21:00
--  通过删除临时表行来更新数据总出错
如下代码:
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!"

是不是不能通过删除临时表中的行来实现删除实际表中的行的作用?

谢谢!



--  作者:Bin
--  发布时间:2013/11/11 14:29:00
--  
这是BUG,已经反馈给开发人员了.