This project is read-only.

How to run upgrade script for SQL_CE to 2.5?

Jun 28, 2011 at 8:26 PM

I am in the process of upgrading my blog to BE 2.5 from 2.0 using SQL_CE, I have successfully copied and renamed the web.config, have all the correct files for SQL_CE in the Bin folder, have my database file in the App_Data folder, have downloaded the standalone version of Sql Server Compact Toolbox utility and now am stuck trying to figure out how to run the script.  I am using Visual Web Developer Express 2010 and running ASP.Net 4.

Please give me detailed instructions how to do this, where do I put the script file and how do I run it to upgrade my database.

Thank you.

Jun 28, 2011 at 8:48 PM

I did include some rough details on this in the SQL_CE folder, ReadMe.txt file, under the section header "Upgrading from 2.0".  It explains downloading this tool which will allow you to point it to an SDF and run a script against it.

That tool has 2 different downloads.  The latest download is a VS add-in, and the other download is a standalone version.  I didn't try the standalone version, but it probably works just as well as the VS add-in version.

If you install the VS add-in version, the way to get to it is to open up "Server Explorer" which should be in the VS Express Edition (View -> Server Explorer).  There should then be a new toolbar icon in the Server Explorer that launches the SQL Server Compact Toolbox, shown below.

That will open up a new window.  You can add a "SQL Server Compact 4.0 Connection", pointing to your SDF file (make a backup first).  On the connection, you can right-click on the connection and select "Open SQL Editor".  Paste in the script and run it.

Jun 28, 2011 at 8:52 PM

Thanks Ben, I am using the Express version of VWD and I don't think it supports the integrated tool.  The standalone version is kind of vague, I haven't a clue on how to use it, I did read and print the instructions you mentioned but there is not any detail on how to actually do this.

Sorry for being such a klutz on this.

Jun 28, 2011 at 8:59 PM

You might be right ... at least VS professional is needed to use the VS add-in.

I imagine the standalone version works similarly.  You point it to the SDF file and then "Open SQL Editor", and then run the script.

I would at least give it a try, if you haven't yet.

Jun 28, 2011 at 9:22 PM
Edited Jun 28, 2011 at 9:35 PM

Well it seems that I got it figured out and ran the script.  I can view the blog local but it will not let me login.  I opened the website and database in Web Matrix and all the users are in the users table, any ideas why I cannot login locally?


Thanks Ben.


For some reason I can login locally now but the users are not visible, I think I have to add something to the web .config because I have about 500 /members/users, something to do with Jason.  I assume this will work in 2.5 also.

Jun 28, 2011 at 9:39 PM
Edited Jun 28, 2011 at 9:41 PM

Did not try it myself, but seems worth checking out:

Jun 28, 2011 at 9:44 PM

Yes, that's true about the Json.  If you add in that one change to the web.config file like we did back with BE 2.0, the users should start appearing again.

Jun 28, 2011 at 9:46 PM

Solved, thanks Ben.