Showing posts with label ans. Show all posts
Showing posts with label ans. Show all posts

Monday, February 20, 2012

Merge Replication and FK constraints

This question is also posted in public.sqlserver.ce, Sorry!
Scenario:
SQL 2000 with 3 tables A, B ans C related to each other with FK constraints.
B has a relation to A and C has a relation to B
In the FK columns the option 'Enforec relationship for replication' is
unchecked
Merge replication to SQL CE
I would like to take some rows from A set up a filter to include related
rows from B and ALL rows from C
In my mind this should work. Despite the fact that there will be some rows i
C with no parent row i B the replication should execute whitout errors.
I got the following confusing error message:
@."Exception 1: Error Code: 80004005 Message : Run Minor Err.: 28557 Source
: Microsoft SQL Server 2000 Windows CE Edition Err. Par. : data
source=\Program Files\VPJ\VPJ.sdf;Exception 2: Error Code: 80040E14 Message
: The OLE DB Execute method failed. The SQL statement is not valid. [,,,SQL
statement,,] Minor Err.: 28560 Source : Microsoft SQL Server 2000 Windows
CE EditionException 3: Error Code: 80040E14 Message : There was an error
parsing the query. [Token line number,Token line offset,,Token in error,,]
Minor Err.: 25501 Source : Microsoft SQL Server 2000 Windows CE Edition
Num. Par. : 1 Num. Par. : 145 Err. Par. : NOT"
Anyone who have succeeded to replicate between SQL 2000 and SQL CE in a
similar scenario
/Thomas B
We do not support the NOT FOR REPLICATION option with SQL Server CE. Make
sure that the box is checked
thanks
gopal