Where is the database?

Topics: ASP.NET 2.0, Business Logic Layer
Nov 24, 2010 at 6:47 PM

I have downloaded and sucessfully installed BE 2.0 RC and configured it to tun SQE_CE successfully.   My question is where is the database?  With Vista DB I could run it and open the database in the App Data folder and make password/email  changes on several users records at one time.  With the users interface in the users setting one can only do 1 record at a time and only change the email and it is painfully slow on the host server.

Is there a way to look at the users data table with SQL_CE as one could in Vista DB Express?

Thank you

Nov 24, 2010 at 7:28 PM

I think you have the database -- it's BlogEngine.sdf.  It's the file you moved into the App_Data folder.

I think what you're looking for is a GUI tool to manage the db?

If so, the only tool I think that works now is WebMatrix (download here).  If you download that, you can open up your blog with WebMatrix.  When you launch WebMatrix, you can do this by selecting "Site From Folder", and then navigate to the folder where you have BlogEngine at (on your computer).  One of the tabs on the left side is "Databases" (the other tabs are Site, Files and Reports).

If you go to Databases, it will show you the SDF files you have (e.g. BlogEngine.sdf).  You can then expand it to see the tables, and you will have the option to edit the data (right click on the table, and select "Data").

WebMatrix isn't perfect -- it's still a beta, but should allow you to edit the DB.  You can also launch the website from within WebMatrix, by clicking Run at the top.  Actually, if you do this, you might first need to go to "Site", then "Settings" and change the .NET Framework Version from .NET 4 (Integrated) to .NET 2 (Integrated).  This isn't necessary to do to edit the DB, just if you want to run the blog using the web server that is included with WebMatrix (IIS express).

Eventually, you will be able to edit the SDF file with Visual Studio.  I don't think that is yet possible.  Once WebMatrix is finally released (in January), I'm guessing at that time, there will be some update to VS (maybe a service pack) that will allow you to use Visual Studio to manage the SQL CE DB.

Nov 24, 2010 at 7:42 PM
Edited Nov 24, 2010 at 7:53 PM

Yes, thank you again Ben, I do have WebMatrix installed, I will give it a try.

BE_2.0 RC is a great piece of work, I am so glad that I discovered BE  awhile back, I have made it though all the upgrades, hopefully I can get my custom work that you helped me with into this new version.


Your suggestion works great Ben, thank you.