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


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

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

帅哥哟,离线,有人找我吗?
guosheng
  11楼 | 信息 | 搜索 | 邮箱 | 主页 | 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()

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/9 16:47:00 [只看该作者]

把你楼上的代码拷贝出来,注释掉大部分,单独留一段或者一句代码测试,看具体是那句代码处理有问题。

 回到顶部
帅哥哟,离线,有人找我吗?
guosheng
  13楼 | 信息 | 搜索 | 邮箱 | 主页 | 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”被约束为是唯一的”的错误提醒?

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/16 19:13:00 [只看该作者]

你说的情况,都不会导致错误。

 

appendload只有一种情况会报错,就是重复加载数据。比如加载了记录1、没有remove,又再加载一次,就会报错。

 

具体问题上传实例测试。


 回到顶部
总数 14 上一页 1 2