SQL Server Compact/SQLite Toolbox add-in for Visual Studio. This add-in adds several features to help your embedded database development efforts: Scripting of tables and data, import from SQL Server and CSV files and much, much more.
Microsoft has all but abandoned support for Sql Server Compact especially when it comes to the tooling, but this add-in makes up for that in spades. This tooling for SQL CE is miles above what Microsoft ever provided. I especially like the ability to import and export schema and data from a full SQL Server which is a huge time saver especially for testing components that support multiple providers.
It has been with disappointment that we've had to watch as Microsoft over the years has slowly and step-by-step dismantled support for SQLCE in Visual Studio (and SSMS/E as well). Their excellent small-footprint, low-overhead, file-based database has lost their attention; it's gone the way of the venerable FoxPro.
Enter ErikEJ and his suite of tools. He has saved the day. We can confidently continue with our SQLCE-based projects.
It's got a few minor quirks here and there; it's not quite to the level of a commercial product, but then... it's not a commercial product.
Erik is very attentive to any topic surrounding SQLCE. He can be readily found frequenting any of the many SQLCE discussion forums. He's always available for support questions, is very helpful and he replies quickly.
Most projects of this nature require us to choose between support, documentation and quality. With SQL Server Compact/SQLite Toolbox we can have all three.
I have downloaded and used SQL Server Compact/SQLite add-in for Visual Studio. The tool picks up where our buddies in Redmond (Microsoft) left off. I found his tool to be very intuitivewith a dash of ingenuity. An example would be importing data from a Comma Seperated Value (csv). Initially, I had one column to import the data. The tool is intuitive where the selection is available by right clicking the table. The ingenuity is where the csv will have to be modified to be used by the tool. Here is an example:
My file contains A,1 B,1 C,1 d,0
The table definition contain fields
(pk) TableID (indentity(1,1) not null letter (varchar(25) not null IsCapital (bit not null)
By modifying the file by placing the field names as a first row, helps with the import.
letter,IsCaptital A,1 B,1 C,1 d,0
Great Job Erik. As we say in Ohio,USA "U are da Man." Translated "You did a wonderful job in developing this tool. Much kudos goes out."
Very glad that there are people in the world that makes it easier for others ( like me ) to do software development. And they do it for free. You Erik is one of them, thank you very much for a super product and quick feedback.
This tool is a must-have, and I use it daily for project work. It's installed on all Windows dev machines. It's incredibly sad that MS won't support CE in their SQL Management Studio, so thank goodness for Erik's efforts in getting us the next best thing. Microsoft should be sending him checks for doing their work for them.
Also want to personally thank Erik for being responsive on Twitter and quickly posting a build with a bug fix that I needed (for long text fields & row height). I was blown away by the response time, thank you so much.
I tried creating a project to test your tool. First, when I display the about box, I notice a bunch of 'no' (see http://i58.tinypic.com/2dv5p4k.jpg). I've already pressed 'Register DDEX Providers' button. Second, when I try to add a new datasource in my project to access a sqlite db file, your tool doesn't show up in the 'Choose provider' window. How to fix that ?
trying to get rid of my problem, I get an error, this time from YOUR tool: I chose Script Database from the menu and then Script Database schema. See http://i59.tinypic.com/2lsxgxs.jpg for the error. The db is a valid one though, it's been created by a video game and can be opened with any sqlite browser tool...
Hi, I was using C# 2010 with SQL Compact on an old laptop and recently bought a new laptop with WIndows 8 and installed Visual Studio 2015. The database program I developed on the old laptop doesn't run under VS 2015 since I don't have SQL Compact on it.
Is there some easy to find and understand how to get SQL CE on 2015? I seem to be in a tailspin trying to figure it out.
Also, this toolbox is a VS extension and can someone point me in the right direction to install this?
Thanks Ron R
To get SQL CE Installed, just install the required runtime as described here: https://sqlcetoolbox.codeplex.com/wikipage?title=Known%20Issues&referringTitle=Documentation - and then install VS 2015 Community (not Express), and then you can simply install the Toolbox from the "Tools, Extensions and Updates" menu
Anytime I want to add a LINQ to SQL for my SQL compact 3.5, I get this error message:
SQL Server Compact - Couldn't find SqlMetal in the expected location: bin\NETFX 4.0 Tools\sqlmetal.exe;
Can you help me?
Thank you in advance
I have found the location but SqlMetal.exe wasn't there at all:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 (The tool points to that file path location.)
1 - I uninstalled the extension and reinstalled it thinking that all the default files will be added; but no luck.
However I found other versions where the SqlMetal.exe already exists
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools
2 - How can I change the path so SQL Server Compact/SQLite Toolbox will point to one of the versions where the SqlMetal.exe already exists ?
Apologies if this has been answered elsewhere, but I wasn't able to find out after doing some web searching. I'm trying to insert into a .sdf database from an external CSV file. When I try the BULK INSERT command, it appears to not be supported.
SQL Server Compact gives me:
Error Code: 80040E14
Message : There was an error parsing the query. [ Token line number = 1,Token line offset = 1,Token in error = BULK ]
Minor Err.: 25501
Source : SQL Server Compact ADO.NET Data Provider
Num. Par. : 1
Num. Par. : 1
Err. Par. : BULK
What's the recommended way to do a bulk insert? I'm runnign version 4.3.0 on VS2015 Thanks!
Installed SQL Server Compact/SQLite Toolbox but in my version of VS, the option SQL Server Compact/SQLite Toolbox in the menu Tools shows that SQLCE 4.0 & 3.5 is missing. My question is why? In menu Tools\Extension and Updates it shows that version 4.2 is installed.
Some more information in order to understand my problem is when I right click "Data Connections" it is not possible to add SQL Compact 3.5.... as well as 4.0 option. Only possibility is to Add SQLite Connection...
Many thanks in advance for your reply.
I have a project with an entity framework model first pattern. I will generate a database from this model, but first it must be a sql server compact (sdf) database. For that I installed the sql server compact/sqlite toolbox. The dialog to choose the datasource appears, but if I press next, than the dialog will be closed and I don't know why. I think before updating to EF 6 it worked with EF 5. Does anybody have a solution? Thanks Andreas
Hi Erik. Sorry but I need a solution for that. I'm hanging with my project. Here is the link to a demo sample.
In this small sample I have the effect I described. Just open the edmx file and try to generate the database from model based on an existing sdf file.
I've got a table (using compact 4.0 connection) with 2 columns (id and name)
Id is a uniqueidentifier and name is nvarchar(25)
the Id column is not filling in automatically though as I believe it should be and result in me getting an error when i try to enter new rows.
Thanks for reply ErikEj
To be honest i'm not a big fan of signing up for various site for 1 app. which is why i posted here since this is where I got the extension at.
As for my guid problem. I've been using CE tables in the past that did autofil Guid's. In fact I can connect to a previous existing CE database that was created using VS2012 and then add rows to it with your extension with no problem and it auto fills not problem. But if I Create any new tables (which are successful) and then go to add new rows that is when the autofill doesn't happen. Also, I am now using 2013 community.
urg.... I hit the other site once I find it again. but honestly trully agittated by it..
What more information will you need. You were asking the create table script, but as I said in the previous post, creating the table is not the issue.
I try to develop an Windows Phone Silverlight 8.1 App with al local database. I designed a database with your tool and add the sdf file to the project.
The database has at the moment only the table Job.
I add Windows Phone Datacontext with your tool.
In the Datacontext file is a Job Class.
Then i created the database with CreateIfNotExists().
But whe i read from the Job table i get the error "table is not avaiable" German "Die angegeben Tabelle ist nicht vorhanden. [Job]"
Which step i have forgotten?
Hi Erik, thank you. I made a small demo project and this works. So i made two changes in my app, first i uninstall it from the mobile dev and i used a smaller name for the db. And this works also.
The sdf file was in the project embeddedResc and copy always.
I want to create SQL file with the changes between the two DBs. When run the Diff tool it seems to compare only the Schema.
Is there a way to compare data in both databases and get Insert statements with the differences?