1.890升级至10.0报错
不能将值 NULL 插入列 'iYear',表 'UFDATA_006_2010.dbo.WA_Bank_Set';列不允许有空值。UPDATE 失败。
处理方式:手工在WA_Bank_Set表中添加字段iyear 字符类型为smallint
或者执行语句
use  UFDATA_006_2010
alter  table  WA_Bank_Set  add  iyear  smallint
use  UFDATA_006_2011
alter  table  WA_Bank_Set  add  iyear  smallint
2.同步执行 use  UFDATA_006_2011
insert WA_account (cGZGradeNum,cGZGradename,cmoney,iLastYear)
drop删除表values(0,0,0,2014)
3.升级为10.0的帐套会报这个错:
不能将值 NULL 插入列 'ID',表 'UFDATA_006_2010.dbo.ap_digset_base';列不允许有空值。INSERT 失败。
处理方式:手工在ap_digset_base表中将ID允许为空
或者执行语句:
use  UFDATA_006_2010
alter  table ap_digset_base alter column[id] smallint null
4.修改固定资产卡片表fa_Cards中sDeprSubjectNum的长度,因为科目编码扩展到13级了
处理方式:先删除表fa_Cards,再到升级成功的表,到建表语句,重新建该表
5.存货核算模块12月已经月结但是没有年结
update UFSystem.dbo.UA_Account_sub set bclosing='1'WHERE cAcc_Id='835' AND
iYear=2008 AND cSub_Id='IA'
6.-2147217900
不允许对索引 'dbo.Ap_Note.cLink' 显式地使用 DROP INDEX。该索引正用于 FOREIGN KEY 约束的强制执行。
执行如下语句时出错:
--删除索引
IF  EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[Ap_Note]') AND name = N'cLink')
DROP INDEX [dbo].[Ap_Note].[cLink]
处理方法 :
ALTER TABLE [dbo].[fa_Cards] DROP CONSTRAINT [FK__fa_Cards__sDeprS__7E82A310]
GO
ALTER TABLE [dbo].[Ap_Note_Sub] DROP CONSTRAINT [FK__Ap_Note_S__cLink__55808D7D]
GO
aLTER TABLE [dbo].[Ap_Note_Sub] DROP CONSTRAINT [FK__Ap_Note_S__cLink__5F09F7B7]
GO
7.-2147217900
不到存储过程 'AlterTable'。
执行如下语句时出错:
--=====================(计量单位组)================================================================
--(ComputationGroup)
if ((select length from syscolumns where id=OBJECT_ID('ComputationGroup') and name='cGroupCode')<=20)
begin
declare @AlterSql nvarchar(1000)
set @AlterSql='ALTER TABLE ComputationGroup alter column cGroupCode nvarchar(35) NOT NULL'
EXEC AlterTable 'ComputationGroup','cGroupCode',@AlterSql,'nvarchar','35'
end
8.错误信息:
-2147217900
列 'dbo.Ap_Note.cLink' 的长度或小数位数与外键 'FK__Ap_Note_S__cLink__5F09F7B7' 中的引用列 'Ap_Note_Sub.cLink' 的长度或小数位数不同。参与构造外键关系的列必须定义为具有同一长度和小数位数。
执行如下语句时出错:
--建外键
ALTER TABLE [dbo].[Ap_Note_Sub]  WITH CHECK ADD  CONSTRAINT [FK__Ap_Note_S__cLink__
5F09F7B7] FOREIGN KEY([cLink])
REFERENCES [dbo].[Ap_Note] ([cLink])
处理方式:
ALTER TABLE dbo.Ap_Note ALTER COLUMN cLink nvarchar(34)
ALTER TABLE dbo.Ap_Note_Sub ALTER COLUMN cLink nvarchar(34)
9.-2147217900
不到列 "dbo" 或用户定义的函数或聚合 "dbo.UDF_GetLocaleID",或者名称不明确。
执行如下语句时出错:
ALTER    VIEW Rpt_GlbDEF AS
Select ID,SystemID,Name,Title,DatabaseEx,WhereEx,Predicate,Type,RelatiON,Note,Cols,SectiON,Fields,DataSource,BaseTable,IsBaseTable,IsCONtrolCREATE,IsBase,GroupDefine,DEFAULTTITLE,sFilterAddSQL,sFilterAddNote,ClassName,FilterClass
From Rpt_GlbDEF_Base Where Rpt_GlbDEF_Base.localeID= dbo.UDF_GetLocaleID()
处理方法:
use UFDATA_807_2008
CREATE FUNCTION UDF_GetLocaleID()
RETURNS varchar(32)  AS 
BEGIN
declare @LocaleID varchar(32)
select @LocaleID=LocaleID from U8LangDefine with(nolock) where LangID=@@LANGID
return @LocaleID
END
10. -2147217865
对象名 'dbo.AA_BusObject' 无效。
执行如下语句时出错:
--修改View
ALTER  VIEW dbo.AA_BusObject
AS
SELECT [cBusObId], [cBusObName], [iAuthType], [bAuthControl], [cSub_Id], [cMark], [pubufts], [iFuncType],[iOrder],[bLocked],[cLockedBy]
From AA_BusObject_base where langid =dbo.UDF_GetLocaleID()
处理方法:
先删除表:DROP TABLE [dbo].[AA_BusObject_base]
重新创建表:CREATE TABLE [dbo].[AA_BusObject_base](
[cBusObId] [nvarchar](50) NOT NULL,
[cBusObName] [nvarchar](300) NOT NULL,
[iAuthType] [tinyint] NOT NULL,
[bAuthControl] [bit] NOT NULL,
[cSub_Id] [nvarchar](100) NULL,
[cMark] [nvarchar](500) NULL,
[pubufts] [timestamp] NULL,
[iFuncType] [smallint] NULL,
[langid] [nvarchar](20) NOT NULL,
[iOrder] [smallint] NULL,
[bLocked] [bit] NULL,
[cLockedBy] [nvarchar](20) NULL,
[bNoAuth] [bit] NULL,
[bAuthDimControl] [bit] NULL,
[bDeptControl] [smallint] NULL,
[bPersonControl] [smallint] NULL,
[bAuthDim1Control] [smallint] NULL,
[bAuthDim2Control] [smallint] NULL,
[bAuthDim3Control] [smallint] NULL,
[bAuthDim4Control] [smallint] NULL,
[bCustDimControl] [smallint] NULL,
[cAuthDimControlScope] [nvarchar](10) NULL,
[PrimaryKeyFieldName] [nvarchar](200) NULL,
CONSTRAINT [PK_AA_BusObject] PRIMARY KEY CLUSTERED
(
[cBusObId] ASC,
[iAuthType] ASC,
[langid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AA_BusObject_base] ADD  CONSTRAINT [DF__AA_BusObj__bAuth__0BD27C8D]  DEFAULT ((0)) FOR [bAuthControl]
GO
ALTER TABLE [dbo].[AA_BusObject_base] ADD  CONSTRAINT [DF__AA_BusObj__langi__5914549
B]  DEFAULT ('zh-CN') FOR [langid]
GO
ALTER TABLE [dbo].[AA_BusObject_base] ADD  DEFAULT ((0)) FOR [bNoAuth]
go
再执行创建视图语句
ALTER  VIEW dbo.AA_BusObject
AS
SELECT [cBusObId], [cBusObName], [iAuthType], [bAuthControl], [cSub_Id], [cMark], [pubufts], [iFuncType],[iOrder],[bLocked],[cLockedBy]
From AA_BusObject_base where langid =dbo.UDF_GetLocaleID()

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。