GUID为00000000-0000-0000-0000-000000000000导致合并索引冲突 [英] GUID of 00000000-0000-0000-0000-000000000000 causing merge index violation

查看:1341
本文介绍了GUID为00000000-0000-0000-0000-000000000000导致合并索引冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的开发人员有一个与我的数据库对话的linq-2-sql项目.该数据库参与合并复制.它已经使用了一段时间,并且运行良好.最近的表已添加到架构中,现在在添加新记录时会引起问题.

Our developer has a linq-2-sql project that talks to my database. The database is involved in merge replication. It has been in use for some time and was working fine. A recent table was added to the schema and now is causing problems when new records are added.

用户收到一条错误消息,指出与合并复制自动创建的guid相关的索引违反了唯一约束.

The user get's an error message stating that the index related to the guid that merge replication automatically creates is violating a unique constraint.

据我所知,该表与所涉及的其他表没有任何不同.我已经从头开始重新创建了整个复制发布/订阅模型,除了那张桌子以外,其他所有东西仍然可以正常工作.

From what I can tell the table isn't any different than others that are involved. I have recreated the entire replication publication/subscription model from scratch and everything continues to work but that one table.

有人有什么想法吗?正在创建的guid显示为00000000-0000-0000-0000-000000000000,这将解释为什么它是重复的.为什么linq无法创建有效的guid?

Anyone have any ideas? The guid being created appears as 00000000-0000-0000-0000-000000000000 which would explain why it's a duplicate. Why is a valid guid not being created by linq?

推荐答案

当您的意思是"Guid.NewGuid()"时,您是否在代码库中的某个地方使用了"new Guid()"?

Did you use "new Guid()" somewhere in your code base when what you meant was "Guid.NewGuid()"?

这篇关于GUID为00000000-0000-0000-0000-000000000000导致合并索引冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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