0

I want to publish my project with compact database but I have an error message that says: the path is not exists, I solved it by write this code:

SqlCeConnection connection = new SqlCeConnection("Data Source=|DataDirectory|\\Database1.sdf");

but I don't have result, I mean no delete no select no insert etc.. this my delete code:

SqlCeCommand cmd = new SqlCeCommand("delete from tab ", connection);
        connection.Open();
        cmd.ExecuteNonQuery();
        connection.Close();
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Have you set up the ``AppDomain.SetData`` method? Where is the sdf file location? – raiserle Oct 10 '14 at 18:03
  • 2
    Please [read this](http://stackoverflow.com/a/13313075/22437), then [edit](http://stackoverflow.com/posts/26305361/edit) your question to describe every step you took that let you to conclude that you “don't have result”. – Dour High Arch Oct 10 '14 at 18:07

0 Answers0