解决方案: |
首先从演示帐套(8.11a)引入invoiceitem_sal,invoiceitem_salprn,主要是该表中carditemnum字段重复值太多.然后升级access数据. 其次,在升级到sql 数据库之后,执行一下下面语句来修改"帐套升级失败,错误13,类型不匹配"错误: if exists (select * from sysobjects where id = object_id(N'[dbo].[JustInSQ]') and OBJECTPROPERTY(id, N'IsView') = 1) drop view [dbo].[JustInSQ] GO SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON GO CREATE VIEW dbo.JustInSQ AS SELECT JustInVouchs.cJVCode, JustInVouchs.cInvCode, JustInVouchs.AutoID, Inventory.cInvName, Inventory.cInvStd, JustInVouchs.cCorCode, JustInVouchs.iJVPrice, JustInVouchs.cFree1, JustInVouchs.cFree2, JustInVouchs.CorID, JustInVouchs.cDefine22, JustInVouchs.cDefine23, JustInVouchs.cDefine24, JustInVouchs.cDefine25, JustInVouchs.cDefine26, JustInVouchs.cDefine27 FROM JustInVouchs LEFT OUTER JOIN Inventory ON JustInVouchs.cInvCode = Inventory.cInvCode GO SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON GO if exists (select * from sysobjects where id = object_id(N'[dbo].[JustOutSQ]') and OBJECTPROPERTY(id, N'IsView') = 1) drop view [dbo].[JustOutSQ] GO SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON GO CREATE VIEW dbo.JustOutSQ AS SELECT JustInVouchs.cJVCode, JustInVouchs.cInvCode, JustInVouchs.AutoID, Inventory.cInvName, Inventory.cInvStd, JustInVouchs.iJVPrice, JustInVouchs.cFree1, JustInVouchs.cFree2, JustInVouchs.cObjCode, CostObj.cName, JustInVouchs.cDefine22, JustInVouchs.cDefine23, JustInVouchs.cDefine24, JustInVouchs.cDefine25, JustInVouchs.cDefine26, JustInVouchs.cDefine27 FROM JustInVouchs LEFT OUTER JOIN CostObj ON JustInVouchs.cObjCode = CostObj.cCode LEFT OUTER JOIN Inventory ON JustInVouchs.cInvCode = Inventory.cInvCode GO SET QUOTED_IDENTIFIER OFF SET ANSI_NULLS ON GO 注意在升级过程中使用事件探察器跟踪,走到哪里走不下去了,就看跟踪信息,然后查找相关表和存储过程. |