SQL Server Compact/SQLite Toolbox

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.

(103) Review
Visual Studio
2013, 2012, 2010, 14
Download (370,539)
3/30/2015
4.2.0.0
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (103)
Q and A (68)
Sign in to write a review
Sort by:

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 at 6:58 AM
| Edit |
Delete

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 |
Delete

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

Thanks...

ErikEJ March 08 2015
| Edit |
Delete

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.

Excellent.

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

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.

by Ahmed Abulwafa | November 16 2014

Helped me a lot with my Universal App project.
overall it's a great tool and a must-have.
Good job Erik!

by SilverSideDown | October 16 2014

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.

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


  • Saving script
    7 Posts | Last post November 30, 2014
    • It is already version 4, and when I want to save changes in my script, the Toolbox still opens Save File dialog, where I point to the same file and confirm overwriting. Very annoying...
    • Yes, I know this already - one 1 vote though https://sqlcetoolbox.codeplex.com/workitem/10521 - do you feel like contributing a fix?
    • Shouldn't it be the "obvious thing" from the start?
      - "Hey, you don't have a "Open Project" menu item in File menu!"
      - "Oh, guys, never mind! It will appear after 10 years, and for now you have to do all your work without saving!"
    • As you can see from the single vote for this, and from the feedback I have heard, not many users consider it an issue, but please vote and feel free to contribute to this free Tool. I think many users simply use the editor as a "scratch pad", then include  queries in their source code.
    • If you see this editor as "scratch pad", then why would I use it? I'd then us Notepad or VS Editor. But because editor is connected to the database in context and operates with the database in context, then I expect it to behave as SQL Server Management Studio - edit and save, but not as edit, save as, overwrite over and over again. I like your tool but this "behavior" just irritates me. Well, I guess it ain't that hard to realize that? I'd appreciate it. Thanks.
    • I will consider it for a future release, feel free to contribute a fix.
    • Initial implementation available for preview here: https://sqlcetoolbox.codeplex.com/releases/view/151574 - pls provide feedback
  • Getting started with Sql Server Compact 4.0 in VS 2013
    2 Posts | Last post November 03, 2014
    • Is there a step by step tutorial for getting all of the pieces in place to create a complete Sql Server Compact4.0 database in VS 2013? I have installed your toolbox in my VS 2013 Professional and copied the MyDB.sdf file from the toolbox to the Solution Explorer but the table I created with the toolbox is not recognized by Solution Explored or any thing else. 
      
      I have successfully created a nice contacts DB with SqlCe 4.0 using VS 2012 so I understand that process but of course using VS 2013 is different I think. Is it necessary to use scripts to get the table created and moved to the Solution Explorer? If so how is this done?
      
      I apologize for my inexperience but I hope you can help me. Thanks in advance.
    • Hi, no changes in VS 2013 expect less support built in for 4.0 in Server Explorer. But have you looked in the bin/debug folder for at copy of your database with data/tables in it?
  • Duplicate Records
    4 Posts | Last post September 29, 2014
    • Hi, I'm using LinQ to SQL, I have this simple BD:
      Tables
      Facturas
      Depositos
      Pagos
      
      Relations are like this:
      Depositos One to Many Pagos
      Facturas One to Many Pagos
      
      This is for Initialize DataContext
      <code>
      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
      </code>
      
      This is the "Insert Deposito" function
      <code>
      Public Function DepositoGuarda(ByVal _d As Deposito, ByVal _PagosList As List(Of Pago)) As Boolean
      	db = InicializaDataContext()
      	Dim _result As Boolean = False
      
      	db.Depositos.InsertOnSubmit(_d)
      	db.SubmitChanges()
      	
      	PagosGuarda(_d.IdDeposito, _PagosList)
      
      	Return  _result
      End Function
      </code>
      
      And this for Insert Pagos
      <code>
      Private Sub PagosGuarda(ByVal _IdDepo As Integer, ByVal _PagosList As List(Of Pago))
              Try
                  Dim _currDep As Deposito = db.Depositos.FirstOrDefault(Function(x) x.IdDeposito.Equals(_IdDepo))
                  For Each p As Pago In _PagosList
                      p.Deposito = _currDep
                  Next
      
                  db.Pagos.InsertAllOnSubmit(_PagosList)
                  db.SubmitChanges()
      
              Catch ex As Exception
                  MsgBox(ex.Message)
              End Try
      End Sub
      </code>
      
      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
      
      	Try
              db = InicializaDataContext()
      
      	Dim _result As Boolean = False
      
      
      
      	db.Depositos.InsertOnSubmit(_d)
      
      	db.SubmitChanges()
      
      	
      
      	PagosGuarda(_d.IdDeposito, _PagosList)
              _result = True
      
              Catch (ex as Exception)
                  Msgbox(ex.Message)
              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 September 29, 2014
    • 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?
      
      Thanks
      
      Fulvio
    • 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?
      
      Thanks
      
    • 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?
      
      Thanks
      
      Fulvio
      
    • 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.
      David
  • 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
      
      https://stackoverflow.com/questions/25240486/how-to-use-two-way-binding-on-sql-ce-database-windows-phone-8
      
      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:
      
      http://blogs.msdn.com/b/sqlservercompact/archive/2009/04/01/after-moving-the-database-from-one-platform-to-other-the-first-sqlceconnection-open-takes-more-time.aspx
  • 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 
11 - 20 of 68 Items