| 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
|