Did you know? You can add, manage and delete a SQL Server Compact Edition Database from WebMatrix.

Posted: Jul 22, 2010  1 comments  

Average Rating

A common issue being reported by Microsoft WebMatrix Beta users, is that they are unable to easily delete a SQL Server Compact Edition database from with WebMatrix itself. There is a way to delete the CE databases using the Files workspace of WebMatrix, read on to see how.

 

Let’s start by Getting a site set up to work with.

Step 1: Open the Microsoft WebMatrix Beta

Step 2: Select choose site from template

clip_image001

 Step 3: Select the “Empty Site” and click “ok”

clip_image002

 Step 4: Navigate to Databases Workspace by clicking the Databases button in the lower left hand corner of the screen.

clip_image003

Step 5: Click the "New Database" button in the ribbon.

clip_image004

When you click 'New Database' WebMatrix creates an empty SQL CE database underneath the App_Data folder. WebMatrix then adds a dynamic connection to the database file under the site node in the Databases workspace.

 

Now that we now have a database listed underneath the 'Empty Site' node in the tree, let's look at how to delete it.

Step1: Navigate to Files Workspace by clicking the Files button in the lower left hand corner of the screen.

image

Step 2: Expand the folder structure until the App_Data folder is expanded

image

Step 3: Right click the 'Empty Site.sdf' file and select the Delete option.

image

Step 4: Navigate back to the Databases workspace, the refresh the 'Empty Site' folder.

image

You have now deleted your file based SQL Server Compact Edition database connection from the databases workspace of your application.

Submit a Comment

  • Plain text is accepted.
  • URLs starting with http:// are converted to links.