Foxtable(狐表)用户栏目专家坐堂 → 系统提示,列“_Identify”被约束为是唯一的。如何判断哪个表的哪一行数据有问题了?


  共有2544人关注过本帖树形打印复制链接

主题:系统提示,列“_Identify”被约束为是唯一的。如何判断哪个表的哪一行数据有问题了?

帅哥哟,离线,有人找我吗?
guosheng
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:896 积分:7535 威望:0 精华:0 注册:2017/12/27 14:19:00
系统提示,列“_Identify”被约束为是唯一的。如何判断哪个表的哪一行数据有问题了?  发帖心情 Post By:2018/5/7 9:10:00 [显示全部帖子]


图片点击可在新窗口打开查看此主题相关图片如下:qq截图20180507090629.jpg
图片点击可在新窗口打开查看

系统反复提醒的identity的值都是401
1、如何判断那张表的哪一行出问题了啊?
2、如果屏蔽该错误的出现,是否会影响系统其它的运行?
If e.message1.Contains("运行错误") Then
    e.Cancel = True
End If

谢谢!
[此贴子已经被作者于2018/5/7 9:47:26编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
guosheng
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:896 积分:7535 威望:0 精华:0 注册:2017/12/27 14:19:00
  发帖心情 Post By:2018/5/7 10:26:00 [显示全部帖子]

登陆系统,没有做任何操作。 但是计划管理有定时刷新数据的代码。

 回到顶部
帅哥哟,离线,有人找我吗?
guosheng
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:896 积分:7535 威望:0 精华:0 注册:2017/12/27 14:19:00
  发帖心情 Post By:2018/5/7 10:30:00 [显示全部帖子]

代码应该怎么写sql查询401所在的行啊?

 回到顶部
帅哥哟,离线,有人找我吗?
guosheng
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:896 积分:7535 威望:0 精华:0 注册:2017/12/27 14:19:00
  发帖心情 Post By:2018/5/7 11:34:00 [显示全部帖子]

打开项目时,默认是加载了所有数据;而且目前的版本是开发版而不是高级开发版。怎么实现即时同步数据(如果不通过计划管理,卸载和追载符合筛选条件的数据)?

 回到顶部
帅哥哟,离线,有人找我吗?
guosheng
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:896 积分:7535 威望:0 精华:0 注册:2017/12/27 14:19:00
  发帖心情 Post By:2018/5/9 15:51:00 [显示全部帖子]

以下代码是否能让系统不提示:identity被约束为唯一的错误提醒?
If e.message1.Contains("运行错误") Then
    e.Cancel = True
End If

 回到顶部
帅哥哟,离线,有人找我吗?
guosheng
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:896 积分:7535 威望:0 精华:0 注册:2017/12/27 14:19:00
  发帖心情 Post By:2018/5/9 16:37:00 [显示全部帖子]

刷新的代码太多了,不好意思了。麻烦老师看看吧。
计划管理的代码:

DataTables("合同基本信息表").StopRedraw()     '实现即时刷新数据功能
LockBaseMainForm()
'完善合同审批(招标之后)
If (user.group="工程一部" And user.isrole("录入"))  Or  (user.group="工程二部" And user.isrole("录入"))  Or  (user.group="设计部" And user.isrole("录入"))
DataTables("合同基本信息表").RemoveFor("承办部门='"& user.group &"' and 承办人 is null")
DataTables("合同基本信息表").AppendLoad("承办部门='"& user.group &"' and 承办人 is null")
End If

'审核审批
If user.group="服务管理中心"  Or  user.group="公司领导"   Or  user.group="企管部" Or (user.group="财务部" And user.isrole("财务主管")) Or (user.group="财务部" And user.isrole("部门经理"))
DataTables("合同基本信息表").RemoveFor("承办人 is not null  and  审核人 is null and 是否属于专业暂估=0")
DataTables("合同基本信息表").AppendLoad("承办人 is not null  and  审核人 is null and 是否属于专业暂估=0")
Else
DataTables("合同基本信息表").RemoveFor("承办部门='"& user.group &"' And 承办人 is not null  and  审核人 is null and 是否属于专业暂估=0")
DataTables("合同基本信息表").AppendLoad("承办部门='"& user.group &"' And 承办人 is not null  and  审核人 is null and 是否属于专业暂估=0")
End If

'合同交接
If user.group="服务管理中心"  Or  user.group="公司领导"   Or  user.group="企管部"
DataTables("合同基本信息表").RemoveFor("审核人 Is not null and  是否属于专业暂估=0 and 提交合同交接日期 Is null")
DataTables("合同基本信息表").AppendLoad("审核人 Is not null and  是否属于专业暂估=0 and 提交合同交接日期 Is null")
Else
DataTables("合同基本信息表").RemoveFor("承办部门='"& user.group &"' And 审核人 Is not null and  是否属于专业暂估=0 and 提交合同交接日期 Is null")
DataTables("合同基本信息表").AppendLoad("承办部门='"& user.group &"' And 审核人 Is not null and  是否属于专业暂估=0 and 提交合同交接日期 Is null")
End If
'交接确认
If user.group="服务管理中心"  Or  user.group="公司领导"   Or  user.group="企管部" Or (user.group="行政人事部" And user.isrole("档案管理")) Or (user.group="行政人事部" And user.isrole("部门经理"))
DataTables("合同基本信息表").RemoveFor("提交合同交接日期 Is not null And 接收日期 Is null and 是否属于专业暂估=0")
DataTables("合同基本信息表").AppendLoad("提交合同交接日期 Is not null And 接收日期 Is null and 是否属于专业暂估=0")
End If
UnLockBaseMainForm()
DataTables("合同基本信息表").ResumeRedraw()


DataTables("资金使用申请表").StopRedraw()
LockBaseMainForm()
'审核申请
If user.group="服务管理中心"  Or  user.group="公司领导"   Or  user.group="企管部" Or (user.group="财务部" And user.isrole("财务主管")) Or (user.group="财务部" And user.isrole("部门经理"))
DataTables("资金使用申请表").RemoveFor("承办人 is not null  and  资金申请审核人 is null and 是否为工资社保公积金=0 and 是否为虚拟合同=0")
DataTables("资金使用申请表").AppendLoad("承办人 is not null  and  资金申请审核人 is null and 是否为工资社保公积金=0 and 是否为虚拟合同=0")
Else
DataTables("资金使用申请表").RemoveFor("承办人 is not null  and  资金申请审核人 is null and 是否为工资社保公积金=0 and 是否为虚拟合同=0")
DataTables("资金使用申请表").AppendLoad("承办人 is not null  and  资金申请审核人 is null and 是否为工资社保公积金=0 and 是否为虚拟合同=0")
End If

'审核支单
If  user.group="服务管理中心" Or (user.group="财务部" And user.isrole("会计")) Or (user.group="财务部" And user.isrole("部门经理")) Or  user.group="公司领导"  Or  user.group="企管部"
DataTables("资金使用申请表").RemoveFor("[支单金额] is not null and 支单审核人 is null and 是否为工资社保公积金=0")
DataTables("资金使用申请表").AppendLoad("[支单金额] is not null and 支单审核人 is null and 是否为工资社保公积金=0")
End If
'资金支付
If  user.group="服务管理中心" Or (user.group="财务部" And user.isrole("出纳")) Or (user.group="财务部" And user.isrole("部门经理")) Or  user.group="公司领导"  Or  user.group="企管部"
DataTables("资金使用申请表").RemoveFor("((承办人 Is not null  And 是否为虚拟合同=1) Or (资金申请审核人 Is not null And 是否为工资社保公积金=0 And 是否为虚拟合同=0)) And 出纳 Is null")
DataTables("资金使用申请表").AppendLoad("((承办人 Is not null  And 是否为虚拟合同=1) Or (资金申请审核人 Is not null And 是否为工资社保公积金=0 And 是否为虚拟合同=0)) And 出纳 Is null")
End If
'记账凭证
If  user.group="服务管理中心" Or (user.group="财务部" And user.isrole("会计")) Or (user.group="财务部" And user.isrole("部门经理")) Or  user.group="公司领导"  Or  user.group="企管部"
DataTables("资金使用申请表").RemoveFor("是否为工资社保公积金=0 And  出纳 Is not null And 支单审核人 Is not null And 凭证号 Is null")
DataTables("资金使用申请表").AppendLoad("是否为工资社保公积金=0 And  出纳 Is not null And 支单审核人 Is not null And 凭证号 Is null")
End If
'完善建安合同付款(预算录入进度款明细后)
If  user.group="服务管理中心"  Or user.group="公司领导"  Or user.group="工程建设中心"
DataTables("资金使用申请表").RemoveFor("承办部门 is not null  and 承办人 is null")
DataTables("资金使用申请表").AppendLoad("承办部门 is not null  and 承办人 is null")
Else
DataTables("资金使用申请表").RemoveFor("承办部门='"& user.group &"' and 承办部门 is not null  and 承办人 is null")
DataTables("资金使用申请表").AppendLoad("承办部门='"& user.group &"' and 承办部门 is not null  and 承办人 is null")
End If
UnLockBaseMainForm()
DataTables("资金使用申请表").ResumeRedraw()

 回到顶部
帅哥哟,离线,有人找我吗?
guosheng
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:四尾狐 帖子:896 积分:7535 威望:0 精华:0 注册:2017/12/27 14:19:00
  发帖心情 Post By:2018/5/16 19:08:00 [显示全部帖子]

以下情况会不会引起,removefor和appendload刷新,“列“_Identify”被约束为是唯一的”的错误提醒:
1、多用户同时登陆
2、A用户删除已经保存到服务器的某一条数据
3、B用户录入一条新数据——可能占用2中已删除数据的_Identify?
4、造成A用户或B用户,提示列“_Identify”被约束为是唯一的”的错误提醒?

 回到顶部