Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 December 9th, 2010, 07:25 AM
Authorized User
 
Join Date: Dec 2010
Posts: 38
Thanks: 8
Thanked 0 Times in 0 Posts
Default Database cannot be opened

Hi,

I'm trying to continue the book but on another PC. I try to access the PlanetWrox database and I get the following error.

http://i156.photobucket.com/albums/t13/GRiT_02/DB.jpg

Thanks
 
Old December 9th, 2010, 07:30 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,

Sounds like you have SQL Server 2008 R2 on the source machine, but the earlier SQL Server 2008 on the target machine. Databases are not backwards compatible from R2 to the initial version (although they are forwards compatible from 2008 to 2008 R2).

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!
 
Old December 9th, 2010, 08:27 AM
Authorized User
 
Join Date: Dec 2010
Posts: 38
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Thanks for the response.

I've tried to open the chapter 11 source code and I get the same error.

http://i156.photobucket.com/albums/t.../chapter11.jpg

The version of SQL server I am using.

http://i156.photobucket.com/albums/t13/GRiT_02/sql.jpg

Thanks

Last edited by GeeTee991100; December 9th, 2010 at 08:31 AM..
 
Old December 9th, 2010, 09:08 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That's weird. The book was written against Visual Studio 2008 and uses SQL Server Express 2005, so you should definitely be able to open it with 2008 or 2008 R2.

How exactly are you trying to open the database? Do you have multiple instances of SQL Server installed? Is J:\ a network share and if so have you tried doing this from a local disk?

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 December 9th, 2010, 09:15 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Just found this:

http://social.msdn.microsoft.com/For...5-c2182b709e18

Looks like you can't use SQL 2008 databases with VS 2008, so you either need to upgrade to VS 2010, or downgrade to (or install side by side) a copy of SQL Server Express 2005.

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 December 9th, 2010, 09:24 AM
Authorized User
 
Join Date: Dec 2010
Posts: 38
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Thanks for the response.

Strange thing is, it works on my home PC which also has sql 2008 and VWD 2008 installed.

I'll try sql server 2005 and see if it works.

Thanks
 
Old December 9th, 2010, 09: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

I looked into this a bit more and it seems that it does work, provided you have Service Pack 1 for Visual Studio 2008 installed. I just added the PlanetWrox.mdf file (from Beginning ASP.NET 3.5 which means it's a SQL Server 2005 file) to the App_Data folder of a new web site, told Visual Studio to use my Sql2008Express instance (using Tools | Options | Database Tools | Data Connections | Instance Name) and then it worked fine when I double-clicked the MDF file in App_Data.

What about the other questions I asked?

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:
GeeTee991100 (December 10th, 2010)
 
Old December 9th, 2010, 10:05 AM
Authorized User
 
Join Date: Dec 2010
Posts: 38
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
How exactly are you trying to open the database? Do you have multiple instances of SQL Server installed? Is J:\ a network share and if so have you tried doing this from a local disk?

Imar
I've tried to open the database in SSMS for 2008 r2 and that fails too.

J:\ is a usb pen flash drive that I'm using to transfer the whole application from my home PC to my work PC. I've used both this and a local drive and neither works.

I had both sql server 2008 and 2008 r2 but have now uninstalled sql 2008

Quote:
I looked into this a bit more and it seems that it does work, provided you have Service Pack 1 for Visual Studio 2008 installed. I just added the PlanetWrox.mdf file (from Beginning ASP.NET 3.5 which means it's a SQL Server 2005 file) to the App_Data folder of a new web site, told Visual Studio to use my Sql2008Express instance (using Tools | Options | Database Tools | Data Connections | Instance Name) and then it worked fine when I double-clicked the MDF file in App_Data.
I'm only using VWD 2008 express and dont have those options.
 
Old December 9th, 2010, 10:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
I'm only using VWD 2008 express and dont have those options.
It's there on my copy of VWD 2008 Express. Are you sure you installed SP1 and enabled "Show all settings" in the Options dialog?

Once you see that dialog, make sure that the instance name matches the one of your Express instance, whatever that name may be.

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:
GeeTee991100 (December 10th, 2010)
 
Old December 9th, 2010, 11:31 AM
Authorized User
 
Join Date: Dec 2010
Posts: 38
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Still not working. The instance is set to SQLEXPRESS but it still doesnt work.

I'm going to give up on it and simply create the PlanetWrox database on my works PC.

Thanks for your help

Last edited by GeeTee991100; December 9th, 2010 at 11:36 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Get Name of opened Forms akumarp2p C# 2005 4 January 22nd, 2007 08:05 AM
How to close database opened by adodc aa_azadeh Pro VB Databases 1 September 28th, 2004 08:04 AM
Server not yet opened sathishraj Crystal Reports 1 October 15th, 2003 08:33 AM





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