SQL Server Compact/SQLite Toolbox

VSIP Partner Free

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.

(125) Review
Visual Studio
2015, 2013, 2012, 2010
Download (428,123)
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Reviews (125)
Q and A (87)
Sign in to write a review
Sort by:

by SandroR | April 09 2015

This tool is an ESSENTIAL part of Visual Studio since Microsoft
removed from Sql management Studio the support of SqlCE.
Its value is unbelievable and we have only to thank Erik for his remarkable job.
Thank you!

by Matthias Dieter Wallnöfer | April 03 2015

by RandomlyKnighted2 | March 16 2015

This is a fantastic extension. This has helped me several times in the past with migrating databases and with the added ability to migrate SQLite databases I can now do so much more with it. This extension also has the added benefit of being created by the very dedicated ErikEJ who is willing to work with his users to figure out any problem they may be having and to extend the extensions functionality to its full potential.

ErikEJ March 31 2015
| Edit |

Thanks, and thanks for your help with SQLite => SQL Server export

by Tonazzi-M | March 10 2015

This is the best tool for working with SQLite and SQL Compact databases.
Very quick responses from the helpful developer, many thanks for you great work Erik!

ErikEJ March 10 2015
| Edit |

Thanks, and thanks for your debugging help!

by Jc1984 | March 07 2015

Hello to everyone, there is a way to change de result set as grid, I appreciate your help...


ErikEJ March 08 2015
| Edit |

Of course, just go into options and enable result set a grid!

by tmksoft | March 05 2015

Really nice tool.

I use it for editing the database in my Umbraco installations.

by oeduran88 | February 26 2015

Thank you very much for such useful tool. It helped me do some things I wasn't able in Webmatrix.

by Yatajga | February 20 2015

by Rick Strahl | January 28 2015

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.


by Hervé ANCHER | January 16 2015

From France, Very useful !

by SubramanyamRaju.B | January 09 2015

Thanks you so much.

by saramgsilva | January 08 2015

Really useful tool, thank you!

by SitzenPlatz | December 31 2014

Makes working with SQL CE so much easier and straight forward.

by Microasif | December 21 2014

thank you

by chrrud | December 16 2014

This is a really great tool. It makes everything a lot easier!

by hardono | December 11 2014

Thank you for this powerful add-in Erik. Many kudos for saving the day. Without this tool many of us would have just skipped SQL Server Compact and forced to use SQL Server Express.

by Jeff.Bowman | December 05 2014

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.

Thanks Erik, keep up the good work.

Jeff Bowman
Fairbanks, Alaska

by Kountree | December 02 2014

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

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.


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."

by PwAtHexapod | November 30 2014

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.

by ilyasnsk | November 20 2014

Erik, thank you for these very useful tools.

21 - 40 of 125 Items   
Sign in to start a discussion

  • FormatException for DateTime type
    4 Posts | Last post Fri 12:16 PM
    • Hello,
      Trying to open Top 200 Rows I got FormatException: String was not recognized as valid DateTime at ErikEJ.SqlCeToolbox.ToolWindows.ResultesetGrid.LoadData(String sqlText)
      The connection string has DateTime Kind=Utc option. (The ServerVersion  is
      Anyway thanks, I discover the extension just recently and I like it.
    • I think it means that one of your rows contain data that cannot be converted to a DateTime object
    • Hello Erik, 
      Thanks for your answer.
      I did a more experiments with it. SQLiteStudio showed the raw values - it seems to be stored in unix format and somehow wrongly (I can’t  figure why  it is caused  by infrastructure -  I am using SQlite-net, SqLitePCL.raw dlls got through Nuget as the infrastructure, SQLiteConnection is constructed with storeDateTimeAsTicks = true as default setting.) . (e.g. stored 622159416000000000 value is interpreted as 18.7.1972 22:00:00 by the infrastructure).
      Then I experimented with SQLiteStudio, to figure out the SQLite Toolbox is able to show date time stored as correct unix format. I cloned the original table structure to a different table, then insert one row through SQL INSERT statement and  using function strftime('%s', 'now'.) Then using function Datetime(MyDateTypeColumn, 'unixepoch') in SQL SELECT statement showed it correctly. And of course the SQLiteStudio showed the value in raw format in the grid  – an integer number (even for the original case, which was quite valuable for me).
      I looked at  SQLite Toolbox, Edit top 200 Rows, View Data as Report, Script as SELECT execution all raised the exception.  Only using replacing MyDateTypeColumn  Datetime (MyDateTypeColumn, 'unixepoch') in , Script as SELECT  was  successful.
      Question (or kind of suggestion)from that all:  What do you think, if  the  SQLite Toolbox, Edit top 200 Rows, View Data as Report, Script as SELECT execution shows raw values in grid for Datetime SQLite type by default (not doing any date time conversion) , like SQLiteStudio seems to do? (Or if  have some setting which kind of implicit date time conversion is used for that  with possibility of no conversion?)
      I tried to use SQLite very recently, so I might miss something important. Then please excuse me if the suggestion sounds stupid to you.
    • Hi, let us continue the discussion here: https://sqlcetoolbox.codeplex.com/workitem/12224 - have you tried setting the DataTimeFormat to UnixEpoch in the connection string?
  • Possible issues
    3 Posts | Last post Thu 7:01 AM
    • 1. Right click some table in the toolbox, and choose one of the "Script as..." menu items, and a new tab pops up with default script to get you started. I usually type "ctrl a" to select all, and then immediately type "s" because I plan to type "select foo from bar etc..." But what happens is it pops up the save-as dialog box. You need to close it and then it also hijacks the uppercase/lowercase "s" and "S" for some reason, so you need to close the tab and try again.
      2. In VS tool windows, I don't have the "Properties" tool window open ever. I always close it because it takes up space and I don't use it. When I open VS (this only happens once, when you first open VS), I go to the tool window for the sqlce toolbox, I click the "+" to expand my db, click the "+" to expand the "Tables" node, it then automatically opens the "Properties" tool window, and switches to it. I just close it and forget about it, but it happens every time. Wonder why?
    • Thanks for reporting this, suggest you use this link for error reports: https://sqlcetoolbox.codeplex.com/WorkItem/Create - I have logged issue 1. Re 2 - you can disable this via the Settings dialog (DisplayObjectProperties)
    • 1. ok will do in the future, 2. that works thanks
  • Feature request for "new" button
    7 Posts | Last post Wed 9:30 PM
    • In the next version, please consider adding a button "New" to the menu - the one which has open, save, save as, execute, execute + plan, etc...
      Right now when I need a new window I must go into the toolbox, and right click something, and clear out the automatic stuff in the new window, and so on.
      Would be easier with just a "new" button for a new blank window! :-)
      Loving this!
    • Thanks for the great suggestion, this will be in the next daily (and release) - there already is a menu item to do this, but only on the database level named "Open SQL editor" - but I will add it to the Table context menu
    • Oh then maybe I'm doing something wrong? All I have in my menu is:
      open, save, save as, execute, execute + plan, estimated plan, parse, search, ignore ddl errors...
      I am referring to that menu that shows at the top of the editing tab. It has icons and text.
      But there is no "new" window/tab button in there?
    • Got it! I have added an issue to get this done: https://sqlcetoolbox.codeplex.com/workitem/12220 
    • awesome :)
    • This is now available in the latest "daily" - https://sqlcetoolbox.codeplex.com/releases/edit/616898 
    • I just tried the alpha it and it works for me... Thanks, this is such a useful addition!! I have some "bug reports" (maybe it's just me?) I will put separately... And I love the new icons.
  • Could not find SqlMetal location in registry
    6 Posts | Last post September 14, 2015
    • Hi, Erik, 
      I'm trying to create a Linq2Sql DataContext on a SqlCe 4.0 database, but I'm getting an error stating 'Could not find SqlMetal location in registry'. I have verified that SqlMetal exists in the following location:
      C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools
      so I'm guessing I must be missing a key entry, but I have no idea what I would need to enter into the registry to resolve this issue. Any thoughts?
    • Update: 
      So I've been digging through the registry looking for the keys that I think the toolkit is looking for and I've verified the existence of the following keys:
      each of which has an InstallationFolder value that points to a folder in which I have verified taht there is a copy of SqlMetal.exe appears.
      So I'm guessing there is a key that the toolkit 
      I'm using VS2012 pro if that's important. 
    • I fixed some issues relating to sqlmetal detection in the latest refresh, could you try to remove the extension, and reinstalle from the gallery, so you get version 4,3,0,2
    • I did an uninstall and updated to, but to no avail - still unable to locate the SQLMetal in the registry. 
      I checked my path variable and made sure that all three of the folders I listed above were specified, just in case that was the issue, but with no success. 
    • Hi JW, it was a bug - fixed in the latest daily here: https://sqlcetoolbox.codeplex.com/releases/view/616898
    • Success. Thanks so much for all your quick help on this!
    2 Posts | Last post September 08, 2015
    • How can I create a foreign key using 2 columns and refering to a 2 columns primary key ?
      I use sqlce 4 and visual studio community 2015
    • You can do that using SQL script currently, support for it in the UI is pending, planned for NeXT release: https://sqlcetoolbox.codeplex.com/workitem/11501 
  • How to expand tables of a database
    3 Posts | Last post September 06, 2015
    • Hi, I installed the tool, but cannot expand the database to see the tables, etc.
      I'm using VS 2015 Community and created a database in toolbox and after created tables with code first. The database is there, but I cannot expand it and see the tables of the database.
    • I am guessing you are looking at the wrong database file. Suggest you post an issue on CodePlex with reproduction steps
    • You were right! I've created the DB through the toolbox and when the solution was built it created other DB in Debug folder, but until now I didn't know that. Now I pointed the toolbox to the correct .sdf file and all is OK.
      Thanks very much for your hint!!!
  • Unable to add datasource
    6 Posts | Last post August 22, 2015
    • Hello,
      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 ?
    • My tool does not provide features for adding a sqlite dataSource, you must install the SQLIte VS tools, as described here: http://erikej.blogspot.dk/2014/11/using-sqlite-with-entity-framework-6.html 
    • OK. I've downloaded and installed the file mentioned but I get an error ('An unexpected error occured in the .NET Framework data provider...'), although the connection test succeeded.
    • Hello again,
      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...
    • Please try to uninstall and reinstall so you have the latest refresh, version 4,3,0,2. Please let me know if that fixes the issue for you.
    • No error with the latest version! Thank you! ;)
  • How to upgrade?
    6 Posts | Last post August 02, 2015
    • 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
    • Thanks Erik, Seems I have everything downloaded by VS 2015 Community does seem to know about SQL Compact. Do I need to add it somewhere?
      Ron R
    • Did you install the runtime and addin? And what does "not know" mean?
    • Got it thanks for your help Erik. I was missing the runtime.
      Ron R
    • You are welcome, Ron. If you like my tools, I would be grateful for a review here :-)
  • SqlMetal missing
    8 Posts | Last post July 30, 2015
    • Hello, 
      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 
    • Which OS version, and which VS version? And where is sqlmetal.exe located on your machine (if at all)?
    • Thank you for answering, 
      OS: Windows 8.1 Pro 
      VS version: Visual Studio 2015 Community
      Sqlmetal location: 
    • That is not the location of sqlmetal.exe, but sqlmetal.exe.log
    • Hello, 
      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 ? 
      Thank you 
    • I have improved the sqlmetal.exe detection, could you remove, download and reinstall this newer build, and let me know if it Works for you https://sqlcetoolbox.codeplex.com/releases/view/612989 
    • Hello, 
      Thank you very much, it works perfectly. And by the way thank you for the tool it is very useful. 
      Ailiam A.   
    • You are welcome, feel free to post a review of the Toolbox here...
  • How to insert from CSV file?
    3 Posts | Last post July 24, 2015
    • Hello,
      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!
    • Right click a table and select Import from CSV
    • Thanks EricJ!
1 - 10 of 87 Items