Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Replication (2005)
 Merge replication error with uniqueidentifier

Author  Topic 

BrianBurgit
Starting Member

12 Posts

Posted - 2010-02-18 : 10:45:24
I have 2 SQL Server 2005 instances, one local, one remote. I have a table at the local instance that has a uniqueidentifier, with a default value of newid(). I would like to set up merge replication for this table so that I can replicate it to the remote server, so I did that. The reason is that the remote server supports a web app that allows new records to be created. But now when I try to add a new record thru the web app it fails with an error saying cannot insert NULL into the uniqueidentifier field. So I looked at the replicated table at the remote instance and found that the default value of newid() was not set. So I tried to set it and got an error saying error validating the default for the column rowguid. Anyone have any ideas what I should do?

Thanks,

Brian

BrianBurgit
Starting Member

12 Posts

Posted - 2010-02-18 : 13:51:43
SOLVED - apparently my existing uniqueidentifier field did NOT already have newid() set as the default value. I set that and recreated the Publication, and all is good now.
Go to Top of Page

Peter99
Constraint Violating Yak Guru

498 Posts

Posted - 2010-02-24 : 11:16:15
Thanks for update.
Go to Top of Page
   

- Advertisement -