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 November 11th, 2013, 10:27 AM
Registered User
 
Join Date: Nov 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot open PlanetWrox.mdf

I have Windows 8 and SQL Express Edition 2008 R2 (64 bit). I had no problem to connect the database. I copied PlanetWrox.mdf from your download code folder Chapter 12/Resources...

I got an error message "The database file is not compatible with the current instance of the user". I checked the properties and connection out. They look right.

Suggestions??
Shall I upgrade SQL Server Express Edition 2012?
 
Old November 11th, 2013, 02:35 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The database that comes with the book is for SQL Server 2012 and as such cannot be opened with SQL Server 2008.

A few solutions:

1. Use (LocalDB)\v11.0 as the SQL Server instance. You can set this under Tools | Options | Database Tools | Data Connections | SQL Server instance name in VS. Local DB gets installed with VS so that should work.

2. Install 2012 Express side by side. This gives it a new instance name so you need to update the setting from 1) as well.

3. Uninstall the current Express edition and install SQL Server 2012 Express.

Note: only Chapter 12 uses an existing database. The other chapters show you how to create your own; if you start your own database, you can target 2008 R2.

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 November 11th, 2013, 02:43 PM
Registered User
 
Join Date: Nov 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot open PlanetWrox.mdf

Which version of SQL Express edition shall be compatible with PlanetWrox.mdf which came from Beginning ASP.NET 4.0 in C# and VB? I currently used SQL Server 2008 R2 SP1. I downloaded right version NorthWinds Database through Google. It worked fine. I have another PlanetWrox.mdf from the book 4.5. I will try to uninstall current SQL and then I will install SQL Server 2012 Express. Is PlanetWrox.mdf from 4.5 compatible with SQL Server 2012 Express or SQL Server 2013 Express? Please let me know.
 
Old November 11th, 2013, 02:45 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The 4.0 book uses SQL Server 2008 R2, the 4.5 book uses SQL Server 2012.

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 November 14th, 2013, 04:06 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default I had the same problems

When I first started doing it I tried to attach the .mdf file that comes with the download using 2008R2 and it couldn't even see it. Then I had got 2012 SQL Server and when I tried to attach to it gave me error messages something like access denied for Vbboyd/PC-Owner type of a error message. I can't remember right off hand what I had to do make it like it, I think, but I am not sure, that I had to right click on the .mdf file in windows explorer go to properties and go to the security tab and added my user credentials to the .mdf file. I think that is what I did but I am not sure. At least whatever I did it worked. I think that is what I did, but it has been quite a few months back since I did that so now I don't remember exactly, precisely, step by step what I did.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem connecting to PlanetWrox.mdf smloomis BOOK: Beginning ASP.NET 4 : in C# and VB 2 August 8th, 2012 02:32 AM
PlanetWrox Database tables will not open in Database Explorer wednesday61 BOOK: Beginning ASP.NET 4 : in C# and VB 8 July 11th, 2011 09:45 AM
Chapter 12 Can't access PlanetWrox.mdf jkoyle BOOK: Beginning ASP.NET 4 : in C# and VB 4 July 2nd, 2011 04:06 PM
Error Opening PlanetWrox.mdf TeaDrinkingGeek BOOK: Beginning ASP.NET 4 : in C# and VB 1 March 9th, 2011 08:07 AM
can't open aspnet.mdf database file moulot BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 1 October 11th, 2009 07:00 AM





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