I've got a db setup for replication. Replication works fine in both
directions. However ...
On the SQL2k backend, I can do an INSERT INTO to a particular table
(Results) with no problem. When I try to do the same INSERT INTO on the
Results table with SQLCE, I get the error message, "A duplicate value cannot
be inserted into a unique index". Note that I can do an UPDATE on the
Results table with no problem.
I do have one guidcol (uniqueidentifier, Non-null) on the SQL Server table.
To simplify matters, I have NO indexes (except the PK) and a single INT
primary key.
I've noticed in the Query Analyzer (SQLCE), that after a replication sync,
there are now 3 index (?) columns on the table, 2 of which are not in the
main SQLServer table.
s_Generation (int)
s_RowLineage (varbinary)
rowguid (uniqueidentifier)
Is this INSERT INTO failure somehow related to the extra columns added or is
this a rowguid problem?
Earl,
does your INSERT INTO specify the guid's value?
Rgds,
Paul Ibison
|||No it does not. My understanding is that this is a read-only column?
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:eVEX24TVFHA.3044@.TK2MSFTNGP10.phx.gbl...
> Earl,
> does your INSERT INTO specify the guid's value?
> Rgds,
> Paul Ibison
>
|||If there's only one index on the PK and you're not entering a duplicate
record, then the problem must be with the system tables. I notice that you
have posted this same question some time ago without it being solved. Have
you reinitialized in the meantime? Does the error occur after
reinitialization? How about if you remove replication and set it up - is it
reproducible?
Rgds,
Paul Ibison
|||Yes, I actually removed replication from SQL2k, made sure everything was
cleaned out of the database and set it all back up (I drop the database
during the replication process on the subscriber/SQLCE side). I'm really
scratching my head on this one, because everything "looks" correct. I posted
the code for the INSERT INTO logic over in the
microsoft.public.dotnet.framework.adonet forum, just in case I missed
something on that side of it. Apparently it is accurate, as I've had no
responses to a request for input.
What is left? Does the SQLCE database not actually generate a guid for that
column?
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:eRws5BYVFHA.628@.TK2MSFTNGP09.phx.gbl...
> If there's only one index on the PK and you're not entering a duplicate
> record, then the problem must be with the system tables. I notice that you
> have posted this same question some time ago without it being solved. Have
> you reinitialized in the meantime? Does the error occur after
> reinitialization? How about if you remove replication and set it up - is
> it reproducible?
> Rgds,
> Paul Ibison
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment