Re: null values in primary key
- From: "Darren Shaffer" <darrenshaffer@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Apr 2005 10:13:03 -0600
If it comes down to it, you could export the data from your
SQL CE database to flat files on device, drop and recreate
the database, then reload it. It sounds like you can still select
from the table that has the null pk rows.
Can you tell me if your row filter applies to the table that got
corrupted? If so, can you post the filter? I'd like to try and
recreate what just happened to you so I can escalate it to
the SQL CE team if it turns out to be a defect.
--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
"pascal.psion" <pascalpsion@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A25C7619-3BC5-4613-B975-F226CB39177A@xxxxxxxxxxxxxxxx
> Thank you a lot,
>
> I can't drop the pk ("the index cannot be removed because it is being used
> to enforce a contraint"), I ve compacted the database.
> I have a row filter and an agent resolver (subscriber always wins).
> I think I' ll try to copy the data to an another temporary table (without
> pk), but i am not sur that will be the good way.
> I have not another idea (I can't lose the data).
>
> pascal.
>
> "Darren Shaffer" wrote:
>
>> I've never seen that happen in 3+ years developing solutions
>> with SQL CE. If you cannot delete the rows, I'd try dropping
>> the PK, delete the rows and re-add the PK. You could also
>> try Compacting the database and try the above again. If that
>> doesn't work, you may need to delete the database and let merge
>> repl recreate the subscription for you. Before you do that, verify
>> your publication - do you have either a row filter in place or a
>> custom resolver that could be creating this situation?
>> --
>> Darren Shaffer
>> ..NET Compact Framework MVP
>> Principal Architect
>> Connected Innovation
>> www.connectedinnovation.com
>>
>> "pascal.psion" <pascalpsion@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:2E0D716A-BD99-4A46-B38D-672349CE1592@xxxxxxxxxxxxxxxx
>> > Hello,
>> >
>> > I have a very strange problem :
>> >
>> > After a synchronisation with merge replication, my local database
>> > (.sdf)
>> > has four lines where every field is null, with the primary key.
>> > In the device, i can't drop or delete the table.
>> >
>> > So, how can i do for deleted this fours records ?
>> >
>> > It 's impossbile to have a null value in a primary key, so it's very
>> > strange.
>> > Is it a bug of SQL Server, SQL CE ?
>> >
>> > Thank you,
>> >
>> > pascal
>>
>>
>>
.
- Follow-Ups:
- Re: null values in primary key
- From: pascal.psion
- Re: null values in primary key
- References:
- null values in primary key
- From: pascal.psion
- Re: null values in primary key
- From: Darren Shaffer
- Re: null values in primary key
- From: pascal.psion
- null values in primary key
- Prev by Date: Re: null values in primary key
- Next by Date: Problem with RDA.Pull
- Previous by thread: Re: null values in primary key
- Next by thread: Re: null values in primary key
- Index(es):
Relevant Pages
|