读书人

存储过程失误起直追求解决 方案

发布时间: 2013-01-28 11:49:56 作者: rapoo

存储过程出错,急起直追求解决 方案
if exists (select * from sysobjects where name='LeaveInfoHistory')
insert into LeaveInfoHistory select * from LeaveInfo where oldid=@oldid
else
select * into LeaveInfoHistory from LeaveInfo where oldid=@oldid
delete from LeaveInfo where oldid=@oldid

消息 8101,级别 16,状态 1,过程 usp_leaveDel,第 5 行
仅当使用了列列表并且 IDENTITY_INSERT 为 ON 时,才能为表'LeaveInfoHistory'中的标识列指定显式值。
以上存储过程出错了,可是我设了那个属性也不对,所以我想取消leaveinfohistory表中的自动标识列,可是搜不着,所以我导历史记录表的操作就不能执行。急求解决方案
表估计是他们老师设计的

读书人网 >asp.net

热点推荐