After an SQL CE file has been retrieved from isolated storage, it can be opened in an application such as Visual Studio or Microsoft SQL Server Management Studio.
To open an .sdf file in Visual Studio follow these steps:
1. Within Visual Studio, right-click the Data Connections node in the Server Explorer and select Add Connection. The Add Connection dialog is displayed (see Figure 29.7).
2. Within the Add Connection dialog, set the Data Source to Microsoft SQL Server Compact 3.5.
3. Browse and locate the .sdf file using the Connection Properties section.
4. Select OK.
The Server Explorer pane allows you to explore and modify the database schema (see Figure 29.8) and to view table data by right-clicking a table node and selecting Show Table Data.
The ability to visually explore your database schema is important during development. The next section looks at how to generate an entity model from a database using a database-first approach, allowing you to not only view the schema, but also to make changes to it.
18.189.178.237