【问】前台收银结算时报错:数据保存失败! | ||
【适用版本】专卖店9 | 【模块】基础业务 | 【点击数】83 |
【知识编号】82017090500002 | ||
【问题描述】前台收银结算报错:“数据保存失败:违反了primary key 约束’pk_t_rm_saleflow’ ,不能在对象插入重复键。 |
2.执行以下语句修复自增列,执行语句前请先备份好数据库:
use isszmv9
go
declare @tablename varchar(100)
declare test_cur cursor for
select object_name(id) from syscolumns
where status=128
open test_cur
fetch test_cur into @tablename
while @@fetch_status=0
begin
DBCC CHECKIDENT (@tablename, RESEED)
fetch test_cur into @tablename
end
close test_cur
deallocate test_cur
go