|
Subject:
|
Chapter 11
|
|
Posted By:
|
Moorish
|
Post Date:
|
6/2/2008 9:55:12 AM
|
I am at page Chapter 11 page 356 When I drag the Planetwrox mdf to the App_Data folder it does not connect to the SQL database. I am using Visual developer 2008. COULD SOMEONE WALK ME THRU THE DATABASE SETUP. Or can assist me with this problem.
Darnell
|
|
Reply By:
|
Imar
|
Reply Date:
|
6/2/2008 10:28:27 AM
|
Hi Darnell,
What version of SQL server are you using? Did you install SqlExpress at (local)\SqlExpress as explained in the first chapter of the book?
Imar
--------------------------------------- Imar Spaanjaars http://Imar.Spaanjaars.Com Everyone is unique, except for me. Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004 Want to be my colleague? Then check out this post.
|
|
Reply By:
|
Moorish
|
Reply Date:
|
6/2/2008 1:04:43 PM
|
I am using the SQL server 2005 that came with Visual Studio 2008 I am running the SQLexpress local onm machine Microsoft SQL 2005 but we I try to drag and drop the databases it does not work, I really appreciate your help because I really need to finish the book This is the first snag I've had. I think I installed SQLExpress directly from the CD that came with VWD pro
Darnell
|
|
Reply By:
|
Moorish
|
Reply Date:
|
6/2/2008 1:12:03 PM
|
--------------------------- Microsoft Visual Studio --------------------------- The file "C:\BegASPNET\Resources\Chapter 11\PlanetWrox.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Could not open new database 'C:\BEGASPNET\RESOURCES\CHAPTER 11\PLANETWROX.MDF'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file C:\BegASPNET\Resources\Chapter 11\PlanetWrox.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. --------------------------- OK ---------------------------
Darnell
|
|
Reply By:
|
Moorish
|
Reply Date:
|
6/2/2008 1:13:01 PM
|
???? The file is decompressed
Darnell
|
|
Reply By:
|
Imar
|
Reply Date:
|
6/2/2008 4:09:16 PM
|
Judging by the error message, it seems that you didn't create the database inside the App_Data folder, as instructed by the book.
Make sure you add it to App_Data through the Solution Explorer, or drag an existing MDF file from Windows Explorer into the App_Data folder (that you need to create using the Solution Explorer).
How are you dragging the file? It should create a copy when you drag it from the Resources folder into VWD, so you shouldn't get this error message. Or are you maybe dragging the file directly from the ZIP file without extracting the files first as explained at the beginning of the book?
Hope this helps,
Imar
--------------------------------------- Imar Spaanjaars http://Imar.Spaanjaars.Com Everyone is unique, except for me. Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004 Want to be my colleague? Then check out this post.
|
|
Reply By:
|
Moorish
|
Reply Date:
|
6/3/2008 6:51:38 AM
|
I did everything you said still get same error
Darnell
|
|
Reply By:
|
Imar
|
Reply Date:
|
6/3/2008 7:04:07 AM
|
Hi Darnell,
Can you provide a detailed description of all the steps you are performing? You shouldn't get these errors when you follow the book to the letter, so it looks like something is going wrong somewhere. However, it's hard for me to say where without knowing what it is that you do exactly....
Imar
--------------------------------------- Imar Spaanjaars http://Imar.Spaanjaars.Com Everyone is unique, except for me. Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004 Want to be my colleague? Then check out this post.
|
|
Reply By:
|
Moorish
|
Reply Date:
|
6/3/2008 7:37:54 AM
|
darnell_albert@yahoo.com I am desperate, I am willing to give you access to my machine etc. I got to learn this book. It's the best book out there. Please if you have a remote access method or app. email me at darnell_albert@yahoo.com I will give you access. I know we have a time zone difference. However I am will to let you see for yourself I will have Visual studio up etc. I really appreciate your help Thanks
Darnell
|
|
Reply By:
|
Imar
|
Reply Date:
|
6/3/2008 7:55:15 AM
|
quote: It's the best book out there.
I really like these kind of one-liners. Spread the word, spread the word! ;-)
Send me an e-mail through my Profile page (just click my name in this thread) and I'll reply. It might take some time before I can take a look though....
Cheers,
Imar
--------------------------------------- Imar Spaanjaars http://Imar.Spaanjaars.Com Everyone is unique, except for me. Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004 Want to be my colleague? Then check out this post.
|
|
Reply By:
|
planoie
|
Reply Date:
|
6/4/2008 9:32:25 AM
|
I helped Darnell offline and I think the problem was that he wasn't dragging the files into Visual Studio but rather to the physical directory in Windows explorer. This is a little confusing because when re-opening the project (because it's a web site versus a web application project) the database file should become visible. But maybe there is some nuance with the app_data folder in VS.
-Peter compiledthoughts.com
|
|
Reply By:
|
Imar
|
Reply Date:
|
6/4/2008 4:57:45 PM
|
Maybe VWD notices the "drop" rather than the presence of the MDF file?
Darnell: is there anything in the book that is unclear and pointed you in the wrong direction? Or did you just confuse the Solution Explorer and the Windows Explorer?
Peter: Funny that you helped him off-line while he never got back to my offer for help...
Imar
--------------------------------------- Imar Spaanjaars http://Imar.Spaanjaars.Com Everyone is unique, except for me. Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004 Want to be my colleague? Then check out this post.
|