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 July 1st, 2011, 12:56 PM
Authorized User
 
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
Default Chapter 12 Can't access PlanetWrox.mdf

Permissions are correct for All Users, I'm logged on as Administrator, and I have tried both mdf's. One in Chap 12 and one in Sql2005, I'm using Windows 7 and all updates are up to date.

Does anyone have a possible solution. I'm stuck.

My error message when trying to open (double-click) both databases is:

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

Thanks,

JKoyle
 
Old July 1st, 2011, 04:27 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,

By default Visual Studio assumes your SQL Server instance is called .\SqlExpress. Maybe that's causing the issue? Did you install SQL like this as explained in Chapter 1? Do you know the name of your SQL Server instance?

Also, try Google for the exact error messages. This error has been reported a number of times before. The solution is often related to deleting a user folder under Documents for a specific account, but you'll need to read the posts yourself to determine which solution applies to you.

Here's a similar case where deleting the folder seemed to work: Failed to generate user instance of SQL Server

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!
The Following User Says Thank You to Imar For This Useful Post:
jkoyle (July 2nd, 2011)
 
Old July 2nd, 2011, 01:13 PM
Authorized User
 
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
Smile Chapter 12 Can't access PlanetWrox.mdf

It was a name issue, \SqlExpress, however, in using Visual Studio 2010 Professional, it wasn't and still isn't easy to connect to the database.

I had to select Connect to database from the Server Explorer. I had to name the database and I also had to attach a database file. I could browse to select the PlanetWrox.mdf file.

There was a Test Connection button to test. Mine worked.

My question now is, why doesn't the PlanetWrox.mdf get connected automatically when the solution (DatabaseTest) is opened?
 
Old July 2nd, 2011, 02:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Maybe VS 2010 is set up to use a different SQL Server? You can check the default settings under Tools | Options | Database Tools | Data Connections.

Also, make sure your version of SQL Server is compatible with the PW MDF files (SQL Server 2008 or later).

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 July 2nd, 2011, 04:06 PM
Authorized User
 
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
Default Chapter 12 Can't access PlanetWrox.mdf

Thanks. The resolved the issue.

jkoyle





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Opening PlanetWrox.mdf TeaDrinkingGeek BOOK: Beginning ASP.NET 4 : in C# and VB 1 March 9th, 2011 08:07 AM
Chapter 12 - Access to Northwind.mdb Luke24 BOOK: Beginning ASP.NET 1.0 3 November 13th, 2009 07:55 PM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Beginning Access VBA Chapter 12 Comet_0891 BOOK: Beginning Access 2003 VBA 0 June 6th, 2005 11:42 PM
Chapter 12 SQL Server Access crazy BOOK: Beginning ASP.NET 1.0 1 September 20th, 2003 08:59 AM





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