企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 237|回复: 2

DBRW - Error 2042 instead of KEY_ERROR

[复制链接]

70

主题

390

帖子

554

积分

高级会员

Rank: 4

积分
554
QQ
发表于 2014-3-17 07:31:13 | 显示全部楼层 |阅读模式
Hi all,

After upgrading to TM1 version 9.5.2 I observed a strange behaviour of the DBRW function being called from VBA code.

In the previous version 9.0.3 running DBRW from VBA returned either the correct value or KEY_ERROR in case of incorrect element parameters.
Now I get "Error 2042" (which means the same as n/a ?) instead of KEY_ERROR.

Curiously, DBRW formulas in Excel still deliver the known KEY_ERROR.

Any ideas if this is a bug of the mentioned version or just a customizable setting of the server?

I don't assume this is an Excel issue, since it has not been changed (still 2003).

Many thanks for your replys.
回复

使用道具 举报

83

主题

396

帖子

573

积分

高级会员

Rank: 4

积分
573
QQ
发表于 2014-3-17 08:39:21 | 显示全部楼层
Andy,

We have had the same issue when we upgraded from 9.0.2 to 9.5.2.  

Personally I do not see it as a Bug, and to my knowledge is not a server side setting.  What we have done in our VBA when doing any DBR's is to wrap the statment in a custom function which will handle any errors.

i.e. ErrorTrapN(DBR(the dbr statement))

The ErrorTrap function can then deal with any unexpected data.  Bit of a pain when debugging any code, but better user experience if you are catching errors.
回复 支持 反对

使用道具 举报

77

主题

412

帖子

590

积分

高级会员

Rank: 4

积分
590
QQ
发表于 2014-3-17 10:08:52 | 显示全部楼层
Hi,

Thanks a lot for your reply and your suggestion to catch any error that way.

Now I'm relieved that this behaviour of TM1 is normal and not a configuration error.

Adjusting our codes won't be a problem.


Kind regards
Andy
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2020-11-27 14:01 , Processed in 0.091333 second(s), 11 queries , Memcache On.

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表