How do I open a SQL CE4 .sdf database file? - sql-server-ce-4

I installed Microsoft WebMatrix, which, I believe comes with SQL Server CE4. I've tried opening the SDF file in SQL Management Studio (SQL 2008), but I get the following error message:
-------- Microsoft SQL Server Management Studio:
There is no editor available for
'C:\efTest\App_Data\SchoolRepository.sdf'.
Make sure the application for the file
type (.sdf) is installed.
How do I view/modify my .sdf database?
I see there is a similar question on StackOverflow (http://stackoverflow.com/questions/4070860/sql-compact-4-0-cant-open-read-sdf-file) but I would really like to use Management Studio if I can, and not another 3rd party tool.

Have you tried the SQL Server Compact Toolbox?
or the SQL Compact Query Analyzer?

You can download sql ce through web api just follow this link
visual-studio-tools-for-sql-serverl
to do that.

Here are a couple which have worked quite well for me in terms of connecting to SQL CE 3.5 and 4.0 databases:
LINQPad - (See my remark to question) It works quite well plus it allows for specifying LINQ or SQL for queries.
CompactView - Seems pretty full featured + install creates a nice Windows file association so one can simply double-click to open/connect to .sdf files for instance.

All of the other options require SQL CE 4.0 Database Provider installed on your machine.
This one doesn't need provider http://sqlcequery.codeplex.com/

If you are using Visual Studio 2015, 2013, 2012, 2010, try SqlCeToolbox.4.5.0.3.vsix. It is SQL Server Compact/SQLite Toolbox for Visual Studio.
The link:
http://www.sokhawin.com/how-to-open-sql-compact-edition-file-sdf-in-visual-studio-or-linqpad/
It has ability to open and edit.

Related

VS 2013 Query Designer greyed out

I believe I am following the instructions at http://msdn.microsoft.com/en-us/library/vstudio/ms171960.aspx but whatever I try, the Query Designer toolbar remains greyed out and 'Query Designer' does not appear in the main menu. Am I missing something?
(VS2013 version 12.0.21005.1 REL connecting to a SQL 2008 R2 Express db)
Have posted similar problem here - Solved on this thread.
Create two connections in VS Server Explorer.
1) Microsoft SQL Server Database File (SqlClient):
Use this for editing tables, and for the connection string in the software.
2) Microsoft SQL Server + .NET Framework Data Provider for OLE DB:
Use this for visual queries.
Everything is VS, Publish options don't give 'file in use'.
On a completely unrelated Twilight Zone moment - you posted the same question, on the same day, on the same forum, and both our names are Peter G!

SQL Server Compact 4.0 does not work in VS 2010 SP1

I've installed SQL Server compact 4.0 local database and I've added a database. However, if I try to open my database, an unknown errors occurs.
I tried to restart my VS 2010 after install the SQL Server, but it does not help and I cannot open my database.
How to resolve it?
Have a look at the following blog
In this blog you will see that you need to download an additional tool to make it work with visual studio 2010. The link to this tool is present in the same blog (search for the text below) or you may download it using the Web Platform Installer.
Visual Studio 2010 SP1 Tools for SQL Server Compact 4.0
I did not pay attention on a error message: "event log file full".
I just cleaned eventviewer in Windows and all became okay:).
I spied this topic:
I just emptied the event log and tried again:
Windows-R ("Run")
eventvwr
For each event log (in the left hand pane) right-click and select "Clear all events" (backing up the existing log if you care)

How to make data access related features work on my Visual Studio 2010 installation?

(I'm sorry if this ought to be asked somewhere else)
I get the following error message each time I want to access some data-related feature from my VS installation:
That is either rewire my ORM of choice, or test a database connection visually through the Server Explorer, etc.
What exactly should I reinstall here?
I do have Compact Framework installed, just in case here is a list of the related programs and features installed on this environment.
You need the "Visual Studio 2010 SP1 Tool for SQL Server Compact 4.0" and same for 3.5 (assume they are already installed) - see http://erikej.blogspot.com/2011/01/sql-server-compact-40-released.html

Connection with SQL database in visual studio 2010

I have connected with the database successfully by using wizard in server explorer. but the data source is showing nothing. i have googled and search on msdn help. but not get help.
I want to add data source. but add new data source option is disabled for me.
I am using windows form application...
I want ask that am i doing right. could you please tell me how can i get rid of not showing thing.
PLEASE HELP!!!
The Server Explorer of Visual Studio 2010 and the Datasource of your application are completely different. Check the following links to see how you can connect your Windows Form Application with Sql-Server database:
Walkthrough: Connecting to Data in a SQL Server Express Database (Windows Forms)
Connecting to a Database with Visual Studio Tools

Creating SQL CE4 databases

I've downloaded the RTM version of SQL CE (Compact Edition) and installed it. I've installed the SQL Server Compact Toolbox. I understand that SQL CE4 support within Visual Studio won't happen until SP1 drops.
The problem is, while I have tools to edit the CE Database, I can't find a way to actually create a SQL CE4 database. I figure I must be missing something obvious, but 20 minutes of searching hasn't turned up anything. How do I create a SQL CE4 database?
Thanks,
Erick
Edit: I would rather avoid installing and running WebMatrix.
The SQL Server Compact Toolbox also allows you to create a database file (via the Add Connection dialog)
There's probably a better solution, but you could try out WebMatrix. With it I created an Orchard site, but after creating the site you can create new databases by clicking the 'New Database' button.
Really easy. Don't think this is the best option though...

Resources