SQL Server Compact/SQLite Toolbox


SQL Server Compact/SQLite Toolbox add-in for Visual Studio. This add-in adds several features to help your SQL Server Compact development efforts: Scripting of tables and data, import from SQL Server and CSV files and much more.

(82) Review
Visual Studio
2013, 2012, 2010, 14
Download (322,203)
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Reviews (82)
Q and A (56)
Sign in to write a review
Sort by:

by mattilaj | September 04 2014

Great work! Needed to quickly create documentation for a database and the toolbox provided very nice autogenerated images and HTML. Thanks for the effort!

by Hultqvist | August 18 2014

Works as expected with no surprises.

I have been using the code generation for LINQ.
Compared to older DB techniques, automatic generated IDs are just there, no need to request it explicitly.

The tool is now the only one I use.

by Ed (DareDevil57) | August 14 2014

Thank you.

by mwasson74 | August 13 2014

Great and extremely indispensable tool, I wouldn't be able to do this any other way. Very easy to use and Erik offers wonderful support!!

by Someone_Ca | August 13 2014

Excellent tool!..

I am searching for editing of Sql Server Ce database table and I've found this tool. Thanks for it.

by Dan Randolph | August 03 2014

This tool is really nice. I just watched the Channel 9 video again and noticed the support for Windows Phone data models.


I am really interested in developing my own plugin to generate code for my company's SOA design pattern.

by Dennis Mlinaric | July 30 2014

Thanks Erik. Amazing work. Your ongoing support of SQL CE is very much appreciated and I regard your tools as being essential.

by VisualDragon | July 24 2014

If you're working with SQL CE then you need this tool. Actively supported and updated, this toolbox has all the features you could want or need.

by nekopczynski | July 24 2014

I recently took over a contract using SQL ce to replicate large data from SQL server. This add in and the bulk copy add in were real life savers. I was able to script around transferring {a million rows plus} data back and forth between the two. Excellent product and really easy to use. Thanks ErikEJ

by gepetkov | July 14 2014


by OldSkoolMadSkilz | June 24 2014

Excellent tool. Simplifies tasks that would take a LOT of time using other methods. Wish I has it years ago. Would have saved me countless hours of time.

by William Boatin | June 17 2014

I have found your posts and tools useful in getting my MSTest unit tests to use SQL Server CE, successfully.
Thank you!

by Jay Mc Bee | May 26 2014

Awesome toolset! We've used it to script our SQL CE database creation and restore, works like a breeze!!

by edikaufmann | May 13 2014

great tool. It made my SqlCe life much easier!
Just wonder: I'm using the 3.1.6 standalone version! How is this version
compared to the VS add-in ?
How do I know which standalone version is current (newest!)
again thanks for all your effort

by petevick | May 12 2014

Great tool - gets you out of the hole when MS abandoned SQL Server CE.
Not only that, the tools that Erik also provide really take the pain out SQL
Server CE development.

I have just been testing performance of large record sets, and using SqlCeCmd
I was able to export my SQL Server Database to a CE database with no problems.
Build a database, build a table, and then import 3 million rows from a SQL database.

Impressive software and just gets better.


ErikEJ May 12 2014
| Edit |

Thanks for the kind Words, Pete

by ChangedDaily | May 12 2014

Very useful toolbox, integration with Visual Studio is also good.
The toolbox does what I need - examine the structure of sdf files,
view and edit data. The scripting feature is also very useful.

by signitin | May 04 2014

The Best tool to integrate SQL Compact in Windows Phone, saves a lot of time and effort. Well maintained.

by M_Over | April 28 2014

Thanks for all the hard work! This is very valuable. By the way, what are you plans now that Microsoft is no longer supporting SQL Server CE?

ErikEJ April 28 2014
| Edit |

Well, I still support it - I am also considering adding more support for SQLite

by leenetuse | April 27 2014

by Sebastian Grollmus | April 09 2014

Great Tool! We use it for every day - it's a great help working with SQL Server Compact Toolbox.

1 - 20 of 82 Items   
Sign in to start a discussion

  • Duplicate Records
    4 Posts | Last post Mon 4:20 PM
    • Hi, I'm using LinQ to SQL, I have this simple BD:
      Relations are like this:
      Depositos One to Many Pagos
      Facturas One to Many Pagos
      This is for Initialize DataContext
      Private Function dbConnection() As SqlServerCe.SqlCeConnection
              Dim Path As String = Application.StartupPath
              Dim ConnStr As String = "Data Source=" + IO.Path.Combine(Path, "FacturasDB.sdf") + ";Max Database Size=4091;"
              Dim conn As New SqlServerCe.SqlCeConnection(ConnStr)
              Return conn
      End Function
      Private Function InicializaDataContext() As FacturasDBContext
      	Return New FacturasDBContext(dbConnection)
      End Function
      This is the "Insert Deposito" function
      Public Function DepositoGuarda(ByVal _d As Deposito, ByVal _PagosList As List(Of Pago)) As Boolean
      	db = InicializaDataContext()
      	Dim _result As Boolean = False
      	PagosGuarda(_d.IdDeposito, _PagosList)
      	Return  _result
      End Function
      And this for Insert Pagos
      Private Sub PagosGuarda(ByVal _IdDepo As Integer, ByVal _PagosList As List(Of Pago))
                  Dim _currDep As Deposito = db.Depositos.FirstOrDefault(Function(x) x.IdDeposito.Equals(_IdDepo))
                  For Each p As Pago In _PagosList
                      p.Deposito = _currDep
              Catch ex As Exception
              End Try
      End Sub
      And Every time I Insert a deposito with it's Pagos, it inserts as many Facturas as Pagos, I don't know why, there is no code for insert Facturas, any help?
    • Oops! This is the Inser Deposito Function, I missed the _result = True
      Public Function DepositoGuarda(ByVal _d As Deposito, ByVal _PagosList As List(Of Pago)) As Boolean
              db = InicializaDataContext()
      	Dim _result As Boolean = False
      	PagosGuarda(_d.IdDeposito, _PagosList)
              _result = True
              Catch (ex as Exception)
              End Try
      	Return  _result
      End Function
    • Hi, this format is not good for code based issues, that do not really relate to the Toolbox. Suggest you ask in the msdn forum instead
    • Ok, I'll ask in the msdn forum but I think it's a bug because I have to do this in "Old Style" using ADO Net, with SqlCeConnection, SqlCeCommand, etc, and doesn't presented this issue.
  • Large text display
    2 Posts | Last post Mon 6:24 AM
    • Hello, I'm using VS 2013 and latest version of this extension. Have a problem with some of my tables. One of them contains NTEXT column with aprox 30kb of raw data in xml format. When I click 'Edit top 200 rows', addon hangs/works too slow, and I forced to kill devenv process to continue. This happens if table contains only few rows, so I'm confused. Any suggestions?
    • No sure there is a fix, bu suggest you report an issue https://sqlcetoolbox.codeplex.com/WorkItem/Create and attach a database file the has this issue
  • Linq2Sql and Sql Server Compact 4.0
    7 Posts | Last post August 21, 2014
    • Hi,
      I've just intalled the last update of your plugin to my VS2012 ultimate edition and tried to create a datacontext for my .sdf file (Sql Server Compact 4.0) using your toolbox, but the menu item is greyed out saying "needs 3.5"
      What am I missing?
    • You must install the SQL Server Compact 3.5 SP2 runtime: https://sqlcetoolbox.codeplex.com/documentation and construct the DataContext object as described here: http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html
    • When i try to install i receive this:
      "WARNING - On a 64-bit Comuter, install both 32-bit and 64-bit versions of the SQL Server Compact 3.5 SP2 MSI files. Existing SQL Server Compact 3.5 applications will fail if only the 32-bit version is installed on the 64-bit computer. Developers should chain both the 32-bit and the 64-bit MSI files with their applications and install both of them on the 64-bit computer. See install.txt file for more information. Click "Yes" to continue."
      Anyway Sql server compact 4.0 sp1 runtime is already installed on my system. Do I have to install SQL Server Compact 3.5 SP2 runtime as well? Why?
    • Yes, it is required in order to generate the LINQ to SQL code for you...
    • I succesfully succeeded in creating the proxy class by your tool.
      Now when I try to invoke  dc.SubmitChanges() where dc is my DataContext an Exception raises up saying that the DataBase Version is not the expected one. 
      "Incompatible Database Version. If this was a compatible file, run repair. For other cases refer to documentation. [ Db version = 4000000,Requested version = 3505053, filename=..."
      What's wrong?
    • Read my blog post! http://erikej.blogspot.dk/2013/10/sql-server-compact-4-desktop-app-with.html (you MUST initialize the datacontext with a SqlCeConnection, not a connectionstring!)
    • Ok.. I Will thanks!
  • How to Migrate from SQL Server Compact
    5 Posts | Last post August 20, 2014
    • I have a dozen applications in VB Express 2010 which use SQL Compact 3.5 databases. These are single user applications running on Windows 7.
      I understand that I should migrate from SQL Compact to something else. SQL Server Express LocalDB?
      I have not moved to VS 2013 as there was no support for CE when I tried about a year ago.
      I have now installed VS Express 2013 but cannot load the SQL Server Compact Toolbox .
      It is not under Tools - Extensions and Updates - Online - Visual Studio Gallery
      I have downloaded the .vsix file from here but cannot see how to use this.
      I don't mind switching to SQL Server Express or anything else I can run locally. I just need a way of moving the databases simply.
      I am quite happy to buy a full copy of VS 2013 if necessary.
      What is the best way forward?
    • Why the need to migrate?
      1: The Toolbox requires VS Pro and if installed enables good support for SQLCE in VS 2013
      2: You can use the standalone edition to script the SQLCE dba and then run the scripts against SQL Server (Express/LocalDB)
      3: You can also install WebMatrix which has a tool to upsize to SQL Server
    • Thanks Erik
      Yes I would much prefer to stay with SQL Compact
      I have acquired Visual Studio Pro and have successfully installed the toolbox.
      In the toolbox I can access all my SQL Compact databases and I even created a new test database with a couple of tables. All great.
      The Data Connections appear in Server Explorer but they are inactive. Clicking on them does nothing.
      If I try to add any of the Databases as a datasource (old ones or the new one) I get the error "The specified type is not supported by this selector"
      If I try and modify the connection, (it shows as "SQL Server Compact 3.5 (Simple by ErikEJ)") and then reselect the SQL Compact 3.5 option I get an error message that says " The data connection string is invalid at index 74 - missing key value separator"
      Obviously I have missed something important.
      Both SQL Compact 3.5 and 4.0 are installed and in both 32 bit and 64 bit versions. (I think.)
      Many thanks for your help so far. I now could convert my databases to SQL Server but I really like SQL Compact. I need to get the connection string and the dataset definitions working from the applications.
      I have looked at your blog and cannot figure it out. I am sure the explanation is there but I cannot find it.
      Thanks in advance, and apologies for being slow on this.
      David Burden
    • Hi David, first: This is not the best forum for Toolbox support, please use https://sqlcetoolbox.codeplex.com/WorkItem/Create
      The Server Explorer support is mainly made for EF Tools to work, as stated on my blog,a dn will not work with the dataSet designer. And using DataSets with SQLCE is not recommended due to unneccesary double buffering - use LINQ to SQL (or EF) instead.
    • OK. 
      Many thanks. 
      I have noted the correct forum.
  • Twoway binding WP 8
    6 Posts | Last post August 11, 2014
    • Hi
      Thanks for your great tool
      i have a question i followed your instructions on your article(http://erikej.blogspot.com/2013/04/generate-windows-phone-8-local-database.html) and got the database working perfectly fine
      what i changed is i just changed textBlock to textBox and changed binding mode to two way
      when i change the value it's not being updated in the database
      i don't know why
    • Creating a two way binding does not save data, you need to call SubmitChanges to do that.
    • Thank you
    • how do i call submitchanges ?
      I can't find it in data context or anywhere else in my soulotion
      do i have to edit context and add it myself?
    • It is a part of any dataContext http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.submitchanges(v=vs.110).aspx
    • Thanks and sorry to try your patience
      seems like i should be asking very basic questions and it's not the place
      i'm taking my question here
      Thanks for your reply
  • Visual Studio 14 - Won't install sql server compact toolbox
    2 Posts | Last post July 13, 2014
    • Any chance this will be updated for Visual Studio 2014?  Won't install on 2014.
    • Of course, it already is, but the VS Gallery web service is broken. Until it gets fixed, you can download a build for VS 14 from here: https://sqlcetoolbox.codeplex.com/releases/view/123666 - pls let me know if that Works for you!
  • DB created on Server 2012 won't work on Win7
    4 Posts | Last post May 26, 2014
    • Thanks for an awesome toolset! 
      We've automated the DB creation and script generation for our SQL CE database using the SQL Server Compact Toolbox and it works like a charm on the developer machines!
      However, when creating a DB from scratch on the build server running Windows Server 2012 the generated DB doesn't work on the desktop. 
      Even running SqlCeCmd40.exe to verify the DB on the build server (-e repairdelete) reports back that everything looks good ("Database successfully repaired") and still the DB doesn't work on the desktop Win7 machines so effectively we cannot automate the creation of the DB in the build process as of yet, which is a pity..
      Manually running SqlCeCmd40.exe on the Win7 machines against the DB created on the build server fixes the problem - though we can't really tell what is wrong with the DBs created on the build server.
      Any help much appreciated!!!
    • Suggest you contact me directly (email on my blog) or via the MSDN forum - I have some ideas, but need more detail from you, for example, what does "run sq
    • cecmd4.0.exe mean, and what do "not work" mean. And a forum or mail thread is a better forum for that discussion.
    • Many thanks, Erik! - As discussed via mail the problem appears to be related to the different platforms (build server vs. desktop) and using the database in read-only mode at runtime in our app preventing SQL CE to perform its internal db index updates:
  • Future of SQLServerCE
    2 Posts | Last post May 12, 2014
    • Hi,
      I have just posted a review of the toolbox and read a comment in another review about no further support for SQL Server CE, is that true? If it is does that mean I should be looking for another solution?
    • Thanks for the review - SQL CE 4.0 is supported at least until July 2016 http://support.microsoft.com/lifecycle/?LN=en-ie&x=15&y=6&c2=1044 
  • problems with generated datacontext
    2 Posts | Last post May 11, 2014
    • i used your standalone tool (thank you!) to create a linq to sql datacontext for windows phone. ok.
      then, i added the .cs file to a test project in visual studio express 2013 for windows update 2 rc. the project is windows phone 8.1 project.
      i get an error because several namespaces are missing. lines with errors.
      using System.Data;
      using System.Data.Linq;
      using System.Data.Linq.Mapping;
      using System.IO.IsolatedStorage;
      using Microsoft.Phone.Data.Linq.Mapping;
      using Microsoft.Phone.Data.Linq;
      i couldn't find anything about that except "Data" namespaces can't be used.
      is i a problem of the visual studio version?!
    • No, there is a problem with the project type, you must use Windows Phone Silverlight project for SQLCE/LINQ to SQL support
  • where do I change the DB schema
    3 Posts | Last post May 07, 2014
    • I must miss something obvious!
      I'm using Sql Compact Toolbox 4.0 Standalone and CANNOT find where I would change e.g. the field length of an existing table.
      ... otherwise I can do everything!
      thanks for your help
    • You can only do that vai DROP/CREATE TABLE statement currently, or writing your own ALTER TABLE ALTER COLUMN statement. Next release of add-in and standalone will allow you to generate ALTER COLUMN statements as starting point.
    • when i deploy i found this message on wp8
      An attempt was made to load a program with an incorrect format
1 - 10 of 56 Items