Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 3rd, 2014, 05:25 PM
Registered User
 
Join Date: Apr 2014
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Question Chapter 16: SQL server database crashed

I had to uninstall SQL Server Express 2012, and then re-install it because I couldn't access it through SQL Server Management Studio.

I then copied the PlanetWrox database from the book code download section into the Site. I was able to open the database with the Management Studio.

I got to the point where I was using the Web Site Administration Tool. I followed the instruction on pages 630 to 631.

I couldn't open the database from within VS by double clicking it; the error message said it couldn't open the Physical file.

So I used Management Studio to try and open it. The database had no information in it and it said "PlanetWrox (Recovery Pending)".

Any idea what might have happened?

Thanks.
 
Old June 4th, 2014, 03:53 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

This sounds like you may have moved / deleted the underlying database? Or maybe renamed the site's folder or something like that?

Try making a backup of the site including the database files and then delete the database from SQL Server using Management Studio.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 4th, 2014, 11:09 AM
Registered User
 
Join Date: Apr 2014
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I didn't move or change anything.

After I rebooted the computer the database came back with all it's data intact including the roles for the users I picked.

It seems that "Visual Studio Express 2012 for Web" is not playing well with the database. It seems to be locking up the database.

Is there a way to get VS to release the database after it is accessed?

Thanks.
 
Old June 4th, 2014, 11:24 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
Is there a way to get VS to release the database after it is accessed?
Yep, you can close the connection to it from the Server or Database Explorer.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16 - problem in connecting VS to SQL Server DarkenRahl_ITA BOOK: Beginning ASP.NET 4 : in C# and VB 1 October 15th, 2013 06:06 AM
Chapter 16: Login tries to create database rklein99 BOOK: Beginning ASP.NET 4.5 : in C# and VB 3 July 8th, 2013 05:25 PM
Chapter 16 'Register' does not write to database dako3256 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 May 19th, 2010 05:02 AM
Chapter 16 Accessing Database Bruce A Smith BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 7 July 12th, 2009 01:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.