Re: null values in primary key

Tech-Archive recommends: Fix windows errors by optimizing your registry



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


.



Relevant Pages

  • Re: null values in primary key
    ... I ve compacted the database. ... I have a row filter and an agent resolver. ... > try Compacting the database and try the above again. ... >> Is it a bug of SQL Server, ...
    (microsoft.public.sqlserver.ce)
  • Express 2005 to 2000
    ... my hosting doesn't support 2000. ... So i need to recreate the database in sql 2000. ...
    (microsoft.public.access.adp.sqlserver)
  • DTS from sql express 2005 to 2000
    ... Managment Studio and gerenate sql scripts to recreate the database into sql ...
    (microsoft.public.sqlserver.dts)
  • RE: DTS from sql express 2005 to 2000
    ... You are not supposed to run the script generated in SQL 2005 on SQL 2000. ... Managment Studio and gerenate sql scripts to recreate the database into ...
    (microsoft.public.sqlserver.dts)
  • Re: CREATE AGGREGATE failed because type Concatenate does not conform to UDAGG specification due to
    ... Go to the Database tab and click on the browse button next to the connection string. ... In the New Database Reference dialog, enter the details for the database where you want to deploy the assembly and create the user defined aggregate. ... I'm trying to do some CLR integration with sql server 2005. ...
    (microsoft.public.sqlserver.programming)