什么是“插入链接表失败,RAISERROR 无法在 sysmessages 中找到错误 x 的条目”? 意思是?

发布于 2023-02-23 00:20:17 字数 554 浏览 22 评论 0原文

我要求 Access 2002 对 SQL 2000 Server 运行这样的查询:

INSERT INTO tableA (col1, col2, col3, ...)
SELECT (col1, col2, col3)
FROM tableB LEFT JOIN tableA ON tableA.id = tableB.id
WHERE tableA.id IS NULL;

但是它失败了,并给我以下消息:

Microsoft Access

ODBC--在链接表“tableA”上插入失败。

[Microsoft][ODBC SQL Server 驱动程序][SQL Server]RAISERROR 无法 在 sysmessages 中找到错误 800311 的条目。 (#2758)

发生了什么事?

可能值得注意的是,tableA 是一个链接表,而 tableB 是一个仅存在于 Access 中的表。

I'm asking Access 2002 to run a query like this against an SQL 2000 Server:

INSERT INTO tableA (col1, col2, col3, ...)
SELECT (col1, col2, col3)
FROM tableB LEFT JOIN tableA ON tableA.id = tableB.id
WHERE tableA.id IS NULL;

But it fails and gives me the following message:

Microsoft Access

ODBC--insert on a linked table 'tableA' failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]RAISERROR could not
locate entry for error 800311 in sysmessages. (#2758)

What is happening?

It may be worth it to note that tableA is a linked table whereas tableB is a table that exists only in Access..

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

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

发布评论

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

评论(1

仄言 2023-03-02 00:20:17

该消息表明某处的某些 SQL 代码明确引发 ID 为 800311 的错误,但该错误尚未使用 sp_addmessage 添加到 sysmessages。 我会使用 SQL Profiler 来准确查看查询在服务器上的执行方式以及错误发生的位置。 由于对 sysmessages 的引用,我假设您使用的是 SQL 2000,但您应该始终提及版本。

The message suggests that some SQL code somewhere is explicitly raising an error with ID 800311, but that error has not been added to sysmessages with sp_addmessage. I would use SQL Profiler to see exactly how the query is being executed on the server and where the error is raised. I assume you're on SQL 2000 because of the reference to sysmessages, but you should always mention the version.

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