Hello all I thought Iâd share my experiences here for the benefit of others
Frist off I am using Window XP pro service pack 3 (32 bit)
Visual Web Developer Express 2010 service pack 1
SQL Server 2008r2 with advanced tools
I tried and tried to get it to work the books way with no success. Have had some experience with all of this before, so I tried it another way. Here is what I did
I went to the Database Explorer right clicked on Data Connections and chose add new connection you get the following dialog box.
Add Connection (slight aside would be nice to be able to post pictures here of the dialog box for better explanation)
Chose my SQLExpress in the Server Name drop down list
The check âUse Windows Authenticationâ Then Chose âAttach Database Fileâ
Hit the browse button and located my downloaded file from the resource folder. Then Hit Ok.
That worked fine also automatically put the database in my Sql sever with itâs location being where a downloaded the file sits neat.
This worked fine for me until I reached chapter 14 and the second try it out
When I did the first try it out in Chapter 14 it added another copy of the database to my Data Connections in Data Explorer.
Both connections where working fine till I shut down Visual studio by accident and open it up again When I clicked on the second database connected to the Entity object got that same dreaded message
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.
I continued to work because everything was working because of the copy database was working that I created with the add connection method. I created the two new tables then went to add them to the PlanetWrox.edmx and to my surprise they where not there.
So here I am stumped once again so I follow the link so kindly provided by Imar in this thread.
That lead me to this post
http://www.aspdotnetfaq.com/Faq/fix-...-instance.aspx
I ran this query from that post
exec sp_configure 'user instances enabled', 1.
Go
Reconfigure
Then restarted SQL
I did not have to delete any of the files that same thread discussed just using the query seems to work.
Now everything seems to work fine with one exception I now have two copies of the planet wrox database in my website solution. They seem to be totally independent of each other so now I must make update to two databases to get everything to work. Do not know if this will solve future problems but I will keep everyone posted because when I finish this book I plan to reread it and rebuild the PlanetWrox site all over from scratch.
Any comments anyone has about all of this would be nice to hear