标准版、迷你版升级到专业版提示Flevel不存在,手动解决...
金蝶云社区-白色的生活
白色的生活
0人赞赏了该文章 3,644次浏览 未经作者许可,禁止转载编辑于2015年11月16日 13:02:32

1 .首先说明环境:(环境不是必须这样,只是我怕你的不一样出其他错误) win7 操作系统期间64位。
金蝶标准版或者迷你版9.1sp1
金蝶专业版13.0

没有以上环境,升级工具打不开,或者报错。因为升级工具的作者做了限制和默认连接数据库的需要。

2 .错误提示图:(别人的我拿来用)

3.错误原因分析:
是表glacct科目表旧版本比新版本少了fdetail 和flevel字段。fdetail是bit 逻辑类型 ,flevel是 TINYINT 数字类型。

4.解决方法:
设法打开表,并且在表内填充值。
4.1可以按照access2003,然后按照百度搜索到的方法,打开access,然后找到sql视图,按照说明执行下面5里的sql语句(我是一句一句的执行的)。
4.2用前面人写的一个小工具,叫迷你版标准版查询分析器(见附件),可以在没有access的情况下,直接连接安装有迷你版或者标准版的电脑上,
选中连接指定的账套,按照说明执行下面5中的代码(我是一句一句的执行的)。
5.执行的sql代码,添加字段fdetail,flevel和内容。

ALTER TABLE GLacct add Level tinyint

update glacct set flevel=1 where len(facctid)=3
update glacct set flevel=2 where len(facctid)=5
update glacct set flevel=3 where len(facctid)=7

ALTER TABLE GLacct add Fdetail bit

update glacct set fdetail=1
update glacct set fdetail=0 where facctid in (select mid(facctid,1,3) from glacct where flevel=2 )
update glacct set fdetail=0 where facctid in (select mid(facctid,1,5) from glacct where flevel=3 )

注意:我这里的账套是322这样的结构,如果你的科目结构是422这样的
相应的更新语句需要修改成
ALTER TABLE GLacct add Level tinyint

update glacct set flevel=1 where len(facctid)=4
update glacct set flevel=2 where len(facctid)=6
update glacct set flevel=3 where len(facctid)=8

ALTER TABLE GLacct add Fdetail bit

update glacct set fdetail=1
update glacct set fdetail=0 where facctid in (select mid(facctid,1,4) from glacct where flevel=2 )
update glacct set fdetail=0 where facctid in (select mid(facctid,1,6) from glacct where flevel=3 )

经过以上操作,顺利升级。