以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 报错请教如何处理 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=87779) |
-- 作者:ljh29206 -- 发布时间:2016/7/19 13:33:00 -- 报错请教如何处理 .NET Framework 版本:2.0.50727.5485 Foxtable 版本:2016.5.13.1 错误所在事件: 详细错误信息: 列“_Identify”被约束为是唯一的。值“3544”已存在。 没事件提示,也没有 错误的代码提示 都不知道哪里错了!
[此贴子已经被作者于2016/7/19 13:39:23编辑过]
|
-- 作者:大红袍 -- 发布时间:2016/7/19 14:57:00 -- 你的代码应该有问题,繁复的删除和增加行,有可能出现这种问题的。
你具体看看执行了什么代码注释掉试试。 |
-- 作者:ljh29206 -- 发布时间:2016/7/19 15:49:00 -- 定期刷新数据 If DataTables("日程明细").Compute("max(_Identify)") > 0 Then Vars("lastrow") = DataTables("日程明细").Compute("max(_Identify)") ‘ Vars("lastrow") 记录上一次的加载行数 End If \'重新加载 DataTables("日程明细").LoadFilter ="" DataTables("日程明细").Load 后边在 QQ客户端 receivedmessage If msg.StartsWith("U#") Then \'表示修改了某行 Dim pts() As String = msg.Split("#") If pts.Length = 3 Then Dim dr As DataRow = DataTables(pts(1)).Find("[_Identify] = " & pts(2)) If dr IsNot Nothing Then dr.Load() \'重新加载此行 If pts(1) = "日程明细" Then Functions.Execute("日程刷新") End If End If End If ElseIf msg.StartsWith("A#") Then \'表示增加了行 Dim pts() As String = msg.Split("#") If pts.Length = 3 Then If DataTables(pts(1)).Compute("max(_identify)") < pts(2) Then DataTables(pts(1)).AppendLoad("[_Identify] = " & pts(2)) \'追载新增加的行. End If If pts(1) = "日程明细" Then Functions.Execute("日程刷新") End If End If ElseIf msg.StartsWith("D#") Then \'表示删除了行 Dim pts() As String = msg.Split("#") If pts.Length = 3 Then DataTables(pts(1)).RemoveFor("[_Identify] = " & pts(2)) \'移除行 If pts(1) = "日程明细" Then Functions.Execute("日程刷新") End If End If End If 后 , 上边的定时刷新数据就开始 时不时报错了
|
-- 作者:大红袍 -- 发布时间:2016/7/19 16:00:00 -- 确认一下,是定时刷新的问题,还是OpenQQ的问题,如果是OpenQQ的问题,就分别注释掉代码看哪些代码有问题。 |