更新查询“密钥违规”错误 [英] Update Query "Key Violations" error

查看:80
本文介绍了更新查询“密钥违规”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个链接表(到oracle db),我试图对它运行一个简单的更新查询来更改一些数据,但是我收到以下错误:


...由于类型转换失败而没有更新0个字段,因密钥违规而导致24个记录,因锁定违规导致0个记录...


我正在更新的表有4个主键',我正在尝试更新其中一个数据。我正在更新的数据不应该违反多个主键的唯一性。


如何解决关键违规问题。错误,所以我可以更新这个字段?


谢谢。

I have a linked table (to an oracle db), and I am trying to run a simple update query against it to change some data, but I am getting the following error:

"...didn''t update 0 fields due to a type conversion failure, 24 records due to key violations, 0 records due to lock violations..."

The table I''m updating has 4 primary key''s, and I''m trying to update the data in one of them. The data I''m updating shouldn''t violate the uniqueness of the multiple primary key''s.

How do I get around the "key violations" error so I can update this field?

Thanks.

推荐答案


我有一个链接表(到一个oracle数据库),我试图对它运行一个简单的更新查询来更改一些数据,但我收到以下错误:


...由于类型转换失败,没有更新0个字段,由于密钥违规导致24个记录,由于锁定违规导致0个记录...


table我正在更新有4个主键',我正在尝试更新其中一个的数据。我正在更新的数据不应该违反多个主键的唯一性。


如何解决关键违规问题。错误,所以我可以更新这个字段?


谢谢。
I have a linked table (to an oracle db), and I am trying to run a simple update query against it to change some data, but I am getting the following error:

"...didn''t update 0 fields due to a type conversion failure, 24 records due to key violations, 0 records due to lock violations..."

The table I''m updating has 4 primary key''s, and I''m trying to update the data in one of them. The data I''m updating shouldn''t violate the uniqueness of the multiple primary key''s.

How do I get around the "key violations" error so I can update this field?

Thanks.



一个简单的测试。直接从数据库窗口打开链接表。只输入您的一个字段(您尝试使用查询更新的字段)并尝试移至下一条记录。你会注意到它需要在密钥所需的所有字段中都有数据。这与在本机Access表中创建索引相同。在允许保存记录之前,必须对索引中的所有字段进行satfied。

我建议如果你需要添加一条记录,他们会虚拟。在插入查询中的其余字段。

J

A simple test. Open your linked table directly from the Database window. Enter just your one field (the one you''re trying to update with your query) and try to move to the next record. You''ll notice that it NEEDS to have data in all fields required by the key. This is the same as if you were to create an index in a native Access table. All fields in the index must be satfied before you are allowed to save the record.
I suggest that if you need to add a record, they "dummy" up the remaining fields in your insert query.
J


我不确定我理解你的意思。


我没有附加表格(给它添加记录),我正在更新已经存在的记录,所以在任何时候我都没有值在其他领域。


顺便说一句,当我尝试简单地在字段中输入新数据我正在尝试更新时,我得到一个odbc呼叫失败。错误。
I''m not sure I understand what your saying.

I''m not appending the table (adding records to it), I''m updating the records that are already there, so at no point I''m having null values in the other fields.

btw, when I do try to simply enter the new data in the field I''m trying to update, I get an "odbc call failed" error.



我有一个链表(到oracle数据库),我试图对它运行一个简单的更新查询更改一些数据,但我收到以下错误:


" ...由于类型转换失败,没有更新0个字段,24个记录由于密钥违规,由于锁定违规导致的0条记录......


我正在更新的表有4个主键',我正在尝试更新数据他们我正在更新的数据不应该违反多个主键的唯一性。


如何解决关键违规问题。错误,所以我可以更新这个字段?


谢谢。
I have a linked table (to an oracle db), and I am trying to run a simple update query against it to change some data, but I am getting the following error:

"...didn''t update 0 fields due to a type conversion failure, 24 records due to key violations, 0 records due to lock violations..."

The table I''m updating has 4 primary key''s, and I''m trying to update the data in one of them. The data I''m updating shouldn''t violate the uniqueness of the multiple primary key''s.

How do I get around the "key violations" error so I can update this field?

Thanks.



发布更新查询的SQL。您可能无意中为某些记录添加了空值。


4也是一个非常大的复合主键。您确定数据库的结构吗?

Post the SQL of your update query. You may inadvertently be adding a null value to some of the records.

Also 4 is a very large composite primary key. Are you sure about the structure of your database.


这篇关于更新查询“密钥违规”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆