Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : 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 August 7th, 2012, 06:18 PM
Registered User
 
Join Date: Aug 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question Problem connecting to PlanetWrox.mdf

Hi Imar,

I am having trouble connecting to the database provided in the book for the first time. I am using Visual studio 11 beta and I have a sql server R2 installed. Im not sure if VS 11 uses its own built in sql server version but I cant connect to the books data base. It keeps giving me errors like: this file is not compatable with the latest version..

Is there a newer database file somewhere that I can download?

I can create a new database for my website in VS just fine, but Im not sure how to tell what version it is.

I read somewhere that I can upgrade the .mdf file but I'm not sure how to do that. Thanks.
 
Old August 7th, 2012, 08:38 PM
Registered User
 
Join Date: Aug 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Problem Solved

OK, I ran around in circles for hours until I decided to start from scratch with a new test website.
I copied the .mdf file and put it in App_Data and tried to connect..
same error about not the right version...
I then did this and it worked finally!
Server explorer
right click .mdf file
modify connection
make sure data source is:
Microsoft SQL Server Database File
choose the PlanetWrox.mdf
OK
this time it asks you if you want to update the DB file to the newest version
click yes

Why didnt it do this before? i'll never know..
anyways..
 
Old August 8th, 2012, 02:32 AM
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,

Thanks for the update.

VS 11 installs another free version of SQL Server calld LocalDB. it should work with older MDF files as well, so I am not sure what went wrong here.

If you also have an Express edition installed you can set the default SQL Server for Visual Studio under Tools | Options | Database tools | Data Connections.

Hope this helps,

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 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
Problem connecting to ASPNETDB.MDF file nikitos1979 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 April 24th, 2008 09:55 AM
connecting ASPNETDB.MDF to an E-commerce Cart orion846 ASP.NET 2.0 Basics 1 January 2nd, 2007 11:49 AM
Trouble connecting with .mdf file and admin tools Shell84 ASP.NET 2.0 Basics 1 February 27th, 2006 01:08 PM





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