Home > Archive > MS SQLCE > August 2005 > Merge replication does not create default values for table fields









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Merge replication does not create default values for table fields
stephane@mapsolutions.com.au

2005-08-11, 3:24 am

I have a table on SQL Server 2000 sp3 with default values, so when a
new record is inserted and no value is provided for a field , this
default value gets inserted in the field.

I have the table replicated on SQLCE 2.0 (merge replication) but the
default values are not created when the initial snapshot is applied. I
have tried to add the extended properties for the relevant table in the
publication, but has no effect.
I can see in the .sch file that contains the schema of the relevant
table in the snapshot folder that the default value are present
([STATUS] [varchar] (50) NULL CONSTRAINT & #91;DF_Graffiti_STAT
US] DEFAULT
('Open'))
but again it has no effect on SQLCE.

I can get default value on SQLCE to work if I alter the schema on the
device
alter table Graffiti alter column [status] set default 'Open'
but it defeat the purpose and the next time the snapshot is reapplied
it will be lost anyway.
Any idea on how I can get the default value to work on SQLCE with merge
replication?

Thanks
Stephane

Matthew Lock

2005-08-16, 3:23 am

stephane@mapsolution
s.com.au wrote:
> Any idea on how I can get the default value to work on SQLCE with merge
> replication?


Yes, does anybody know how to get default values to work on SQLCE with
merge
replication? I can't get it to work either.

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com