Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 3rd, 2014, 05:25 PM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old June 4th, 2014, 03:53 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 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!
Reply With Quote
  #3 (permalink)  
Old June 4th, 2014, 11:09 AM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #4 (permalink)  
Old June 4th, 2014, 11:24 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 10:33 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.