none
How Can I Completely Delete a CE Table? RRS feed

  • Question

  • I have an application created with VS 2005 and VB 2005 using a Compact Edition Database. I created some tables that I no longer use or want. How can I permanently delete them from the database?

     

    Tuesday, August 28, 2007 11:55 AM

Answers

  • Connect to the database a run .ExecuteNonQuery:

    Code Snippet

    DROP TABLE tablename

    You may have to run

    Code Snippet

    ALTER TABLE tablename DROP CONSTRAINT constraint_name

     

     

    first, if you have foreign key constraints.

     

    Tuesday, August 28, 2007 1:00 PM
    Moderator