locked
Delete issue in sql server compact 3.5 RRS feed

  • Question

  • Hi Rafik,
    I am new to sync services and I am using it for a new application.

    I have problems to delete the records in the table Sql server compact 3.5

    Scenario:
    I am using sync services ,(N-Tier) (http://msdn2.microsoft.com/en-us/sync/default.aspx)IntroToSyncServicesADODetNet_HighQuality.wmv

    I used the designer and synchronized the tables and it works fine in N-Tier.

    I want to delete the synchronized records using Linq for the (*.sdf - compact db) .

    I created the Ccs.cs using Sqlmetal. Since the designer says provider not supported for this database.

    Then in the code i use

    Ccs db = new Ccs("Data Source=ccs.sdf;");
    var deleteq = from c in db.U1
                       where c.Name.Contains("rajesh")
                       select c;
    foreach (U1 dl in deleteq) // Also tried foreach(var dl in deleteq)
         db.U1.DeleteOnSubmit(dl);

    db.SubmitChanges();


    The code executes without error, but the data in the db remains the same, no changes. (Also for update and Insert)

    What am I missing?
    Help me out.

    Thanks,
    Rajesh






    • Moved by Max Wang_1983 Friday, April 22, 2011 7:25 PM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Monday, April 28, 2008 8:52 AM

Answers

  • Thanks Yunwen, Now its solved. I made a mistake by using the debug folders "*.sdf" file

    Thursday, June 12, 2008 11:44 AM

All replies

  • Hi Rajesh,

     

    are you still seeing the deletes are not done at the db ?

     

    thanks

    yunwen

    Friday, May 16, 2008 11:07 PM
    Moderator
  • Thanks Yunwen, Now its solved. I made a mistake by using the debug folders "*.sdf" file

    Thursday, June 12, 2008 11:44 AM