# Activerecord + ms sql.. rowguid field for merge replication breaking inserts

**URL:** <https://www.ruby-forum.com/t/activerecord-ms-sql-rowguid-field-for-merge-replication-breaking-inserts/190727>\
**Category:** Rails\
**Created:** [June 25, 2010, 10:40pm UTC](https://www.ruby-forum.com/t/activerecord-ms-sql-rowguid-field-for-merge-replication-breaking-inserts/190727 "2010-06-25T22:40:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stewbawka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@stewbawka](https://www.ruby-forum.com/u/stewbawka)\
**Post date:** [June 25, 2010, 10:40pm UTC](https://www.ruby-forum.com/t/activerecord-ms-sql-rowguid-field-for-merge-replication-breaking-inserts/190727/1 "2010-06-25T22:40:49Z")

</div>

i got my app running with ms sql server as the database and everything  
worked fine. migrations, indexes, constraints, find, create, update,  
etc… the app isn’t actually a web app, butwill be running isolated on  
severally diff machines that may not have consistent internet access…  
part of the requirements was to setup replication so that eventually  
the separate instances would ‘phone home’ and replicate their data on  
our main sql server database.

runnign the replication wizard changed my tables by adding a ‘rowguid’  
column and now activerecord breaks with the following error when i try  
to create a new record:

[unixODBC][FreeTDS][SQL Server]Conversion failed when converting from  
a character string to uniqueidentifier.: INSERT INTO [companies]  
([created\_at], [name], [updated\_at], [rowguid]) VALUES(‘2010-06-25  
20:23:06.032’, ‘test’, ‘2010-06-25 20:23:06.032’, ‘newsequentialid(’)

what are my alternatives to get this to work again?
