A bit more than a month ago, I released SQL CE Database Viewer. I promised in that post I would do a version 2 – with ability to edit the data and some other niceties.
Now I’ve finally finished the beta version 2 of it – so all the standard disclaimers apply. I plan to keep it in beta stage for a month – so, I will release the final version at the end of November or early December. I will put the whole project to CodePlex, under Mozilla Public License v1.1 – so, it is obviously open source and freeware.
As of now, you have to get the installer from here (1.1 MB).
All icons are from FamFamFam, SQL syntax highlighting is based on a method described in istaysharp.net. The installer includes Microsoft SQL CE 3.5 dll’s, so these are covered by SQL Server 2005 Compact 3.5 Redistribution EULA.
SQL CE Database Editor requires .NET 2.0 framework – and as with all .NET programs, the first time you start it, it will take much longer to start than subsequent times, as the native image is created on the first run.
Please report all issues and suggestions as comments to this post.
- View and edit data in both encrypted and unencrypted Microsoft SQL CE 3.5 databases
- Simple and easily understandable overview of tables, indexes, keys and constraints
- Run custom queries and DDL commands
- Easily access SQL CE 3.5 utilities: compact, repair, shrink, verify and upgrade databases (from Microsoft SQL Server 2005 Compact Edition (3.1) and SQL Server Mobile Edition (3.0))
- Does not require MS SQL CE 3.5
- Does not require MS SQL Management Studio
- Works from Windows Explorer (create association manually)
After you open the database, you will get some general information about the database – size, location and so forth. Select individual tree nodes to see the table data, indexes, keys and constraints.
If you expand table node, you will get the information about the table columns. Column nodes with key icons are primary keys – and you can see the information about column in tooltip (Data type, Precision, Scale, Max Length).
Similarly, tooltips for indexes give more information about the details of that index.
If your database has images in it, double-click on the datagrid cell that displays the image fragment to make it bigger. On the image below are images from Microsoft’s Northwind.sdf sample database. Double-click on enlarged image will restore it to the original size.
After you’ve opened the database, you can run queries and DDL statements. As you can see from the image below, SQL syntax is highlighted. You can execute the query also with F5 function key.
One important feature is that you can add tables and columns to the query window from the database treeview – just hold down the control key and click on the table or column name. Note that brackets  are automatically added to the table/column name.
Tools window hasn’t changed since v1 – except that if you have a database open in the main window and will click on Tools button, that database is automatically selected in Tools window as well.
These are all normal SqlCeEngine operations, it is just simpler to use them from CE Editor. Like it says, Repair will attempt to recover corrupted rows first, then remove those it was unable to recover. Verify will report that the database is corrupt if you’ve specified a wrong password.
Database will be backed up for all operations, including Verify.
- Better installer – probably NSIS
- Options to customize font size (maybe?)
- Query RichTextBox behaves weirdly sometimes – probably sqlparse.dll has issues with high ASCII/multibyte characters. See what can be done about it
- Fix/change namespaces in source files
- Switch positions of Tools and Query buttons, more logical that way
- Auto-close query window when Tools is clicked