Use Visual Studio Server Explorer to Add New or Existing SQL Server CE Database
By | August 7, 2011

SQL CE is a free, embedded, lightweight  database engine that enables easy database storage. This does not required any installation and runs in memory. Visual Studio 2010 SP1 Came up with nice tooling support for SQL Server CE. We can add a SQL CE Data base using Add New Item option from Solution Explorer Context Menu. But In this tip I am going to talk about how you can add a New SQL CE Database or Add a Existing one from Server Explorer. 

This will also help you to connect with some existing created SQL CE Databases as well. Below are the steps which you needs to follow.

First open the Server Explorer from View > Server Explorer ( Ctrl + W , L )

Then Click on “Connect To Data Base Icon

 Use Visual Studio Server Explorer to Add New or Existing SQL Server CE Database

This will brings up the “Add Connection Dialog” but default Data Source is set to “Microsoft SQL Server ( SqlClient) . Click on “Change..”

 Use Visual Studio Server Explorer to Add New or Existing SQL Server CE Database

In “Change Data Source” dialog, select “Microsoft SQL Server Compact 4.0”  as Data Source and by it will have only single Data Provider “.NET Framework Data Provider for Microsoft SQL Server Compact 4.0

 Use Visual Studio Server Explorer to Add New or Existing SQL Server CE Database

on click of “Ok” it will navigate back to “Add Connection Window”.

There you can “Create a New SQL CE DB” or can browse  existing “SQL CE DB

 Use Visual Studio Server Explorer to Add New or Existing SQL Server CE Database

Click on “Browse” will launch the Open File dialog box from where you have to specify the existing file names .  If you want to create a new open click on “Create”  button, it will launch Create New SQL CE Compact Data Base Window.

image thumb5 Use Visual Studio Server Explorer to Add New or Existing SQL Server CE Database

Provide file name and required information and click on OK, you will find the SQL CE Database on the Server Explorer.

One thought on “Use Visual Studio Server Explorer to Add New or Existing SQL Server CE Database

  1. clipless pedals

    Eugh, seriously, where did you learn how to write. I know to each his (her) own but I can’t follow you writing style :s I am sure you will delete this but I just thought you should know. Monica

Comments are closed.