无法选择用户信息(UserInfo)中的记录。用户身份: , 。动力斧 2009

发布于 2024-09-03 10:23:34 字数 2628 浏览 3 评论 0原文

== 已更新 :) =========

!似乎又一个 2100 的限制!请帮忙!

以下是我们发现的一些更新:

我编写了一个简单的作业:

server static void testEs(Args _args)
{
    UserInfo t;
    ;
    select t;
}

当我以管理员身份运行它时,没有问题。当我删除管理员权限并再次运行它时,我仍然收到该错误: 无法选择用户信息(UserInfo)中的记录。用户身份: , 。

为了简单测试,我们删除了一些用户,从 2188 个用户变为 2074 个用户。删除的用户已经在系统中存在了一段时间(一个月前)。我重做相同的测试(在非管理员时运行上述作业),现在它可以工作了。

有什么想法吗????

==原始消息==================

嗨! (抱歉我的英语不好)

当非管理员用户尝试在我们的生产环境中登录 Axe 时,我们遇到了问题。

实际上,有一个包含这些消息的信息日志(堆栈跟踪附加到消息中):

== 信息日志 ========

无法在用户信息 (UserInfo) 中选择记录。用户身份: , 。 SQL 数据库发出错误。
(S)\Classes\Info\checkStartupCompany_Server - 第 8 行 (C)\Classes\Info\checkStartupCompany - 第 4 行 (C)\Classes\Info\startup - 第 49 行

这是有错误的 sql 语句:

SQL 语句: SELECT TOP 1 A.COMPANY,A.ID,101090 FROM USERINFO A WHERE (((( ID IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,?,?,?,?,?,?,?,?,?,?,?,?, [..并继续..] ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ))

== 信息日志结束 == ======

这是 Info::checkStartupCompany_Server 的内容,其中包含错误的 HERE 注释:

server static void checkStartupCompany_Server(str _curext, userId _curuseid)
{
    UserInfo userInfo;

    if (!hasMenuItemAccess(menuitemdisplaystr(SysDataAreaSelect), MenuItemType::Display) ||
        !hasMenuItemAccess(menuitemdisplaystr(SysDataArea), MenuItemType::Display))
    {
        select firstonly Company from userInfo
            where userInfo.Id == curuserid(); // <== HERE !!!!!!!!!!!!!!

        if (userInfo.Company != curext())
        {
            appl.setDefaultCompany(userInfo.Company, false);
        }
    }
}

=============

在 Info::checkStartupCompany_Server 的代码中,Admin 有意义用户不会遇到这个问题,因为上面的条件被绕过了。

我们现在对公司的设置产生了怀疑。

感谢任何帮助:)

提前致谢:)

== 原始消息结束 ==================

== UPDATED :) =========

! SEEMS LIKE ANOTHER 2100 LIMIT ! PLEASE HELP !

Here's some update of what we've found :

I've written a simple job :

server static void testEs(Args _args)
{
    UserInfo t;
    ;
    select t;
}

When I run it as admin, there's no problem. When I remove my admin privilege and run it again, I still got that error :
Cannot select a record in User Information (UserInfo). User ID: , .

For simple test, we deleted some users, passing from 2188 to 2074 users. The users deleted has been in the system for a while (a month ago). I redo the same test (running the above job when non-Admin) and now it works.

Any idea anyone ??????

== ORIGINAL MESSAGE ==================

Hi ! (Sorry for my bad english)

We encountered a problem when non-Admin users try to log in Ax in our production environment.

Actually, there is an infolog with these messages (the stack trace is appended to the message) :

== Infolog ========

Cannot select a record in User Information (UserInfo). User ID: , .
The SQL database has issued an error.
(S)\Classes\Info\checkStartupCompany_Server - line 8
(C)\Classes\Info\checkStartupCompany - line 4
(C)\Classes\Info\startup - line 49

Here's the sql statement with the bug :

SQL statement: SELECT TOP 1 A.COMPANY,A.ID,101090 FROM USERINFO A WHERE ((((ID IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
[.. and goes on ..]
?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ))

== End Infolog ========

Here's the content of Info::checkStartupCompany_Server with the HERE comment where it does bug :

server static void checkStartupCompany_Server(str _curext, userId _curuseid)
{
    UserInfo userInfo;

    if (!hasMenuItemAccess(menuitemdisplaystr(SysDataAreaSelect), MenuItemType::Display) ||
        !hasMenuItemAccess(menuitemdisplaystr(SysDataArea), MenuItemType::Display))
    {
        select firstonly Company from userInfo
            where userInfo.Id == curuserid(); // <== HERE !!!!!!!!!!!!!!

        if (userInfo.Company != curext())
        {
            appl.setDefaultCompany(userInfo.Company, false);
        }
    }
}

=============

In the code of Info::checkStartupCompany_Server, it makes sens that Admin users doesn't have that problem since the condition above is bypassed.

We have now doubts about the company settings.

Any help is appreciated :)

Thanks in advance :)

== END ORIGINAL MESSAGE ==================

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

猫卆 2024-09-10 10:23:35

在您的 AOS 上增加过程调用 (RPC)。
else 删除一些最近导入的用户。
就我而言,这是有效的。

Increase procedure call(RPC) on your sour AOS.
else Delete some users which were recently imported.
in my case this works.

策马西风 2024-09-10 10:23:35

我认为您可能在 UserInfo 表上启用了记录级别安全性。

I think you may have Record Level Security enabled on the UserInfo table.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文