Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old November 15th, 2012, 11:06 AM
Authorized User
Points: 115, Level: 2
Points: 115, Level: 2 Points: 115, Level: 2 Points: 115, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default chapt 12 1st try it

I am having a problem getting to open the db!

This comes up:

Unable to open the physical file "C:\BeginASP.NET\database\App_Data\PlanetWrox_log. ldf". Operating system error 5: "5(Access is denied.)".
An attempt to attach an auto-named database for file C:\BeginASP.NET\database\App_Data\PlanetWrox.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

db properties:

name: C:\BEGINASP.NET\DATABASE\APP_DATA\PLANETWROX.MDF

connection string: Data Source=MAIN\NEW_2012
SQL;AttachDbFilename=C:\BeginASP.NET\database\App_ Data\PlanetWrox.mdf;Integrated Security=True

provider: .NET Framework Data Provider for SQL Server

state: Closed

type: Microsoft SQL Server

Version: 11.00.2100

Case sensitive: False

Owner: MAIN\Kevin

Prim file path: C:\BeginASP.NET\database\App_Data\PlanetWrox.mdf
  #2 (permalink)  
Old November 17th, 2012, 08:35 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Did you install SQL Server Express as instructed in Chapter 1? It looks like you're using Visual Studio 2012 with SQL Server 2012. Take a look under Tools | Options | Database Tools | Data Connections | SQL Server Instance Name. What do you have there? Try changing that to .\SqlExpress after you install SQL Server Express (2008 or 2012).

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!
  #3 (permalink)  
Old November 23rd, 2012, 09:18 AM
Authorized User
Points: 115, Level: 2
Points: 115, Level: 2 Points: 115, Level: 2 Points: 115, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default chapt 12 1st try it

The db connected, but it comes up with will not work with version!
Do you have a work around for this?
  #4 (permalink)  
Old November 23rd, 2012, 09:25 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you provide more details such as the process you're following, the version of SQL Server installed and the exact error message?

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!
  #5 (permalink)  
Old November 23rd, 2012, 10:28 AM
Authorized User
Points: 115, Level: 2
Points: 115, Level: 2 Points: 115, Level: 2 Points: 115, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default chapt 12 1st try it

This server version is not supported. Only servers up to Microsoft SQL 2008 are supported.
I have version 2012!
No files will show at all, except Mircosoft.SqlServer.Types
Build Version=0
Date Created=2/10/2012
Id=1
IsVisible=True
Major Version=11
Minor Verion=0
Owner=sys
Permission Level=Unsafe
Public Key=0x89845DCD8080CC91
Revision Version=0
  #6 (permalink)  
Old November 23rd, 2012, 01:43 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

As asked before, please provide more information about what you're doing. Right now, I don't even know where this error is coming from...

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!
  #7 (permalink)  
Old November 23rd, 2012, 02:13 PM
Authorized User
Points: 115, Level: 2
Points: 115, Level: 2 Points: 115, Level: 2 Points: 115, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default Just trying to

I am just trying to use your db to run the try it sessions, but the connection worked and setup. But no visable files are in the folders.
Could it be that I have 2012 sql and that is why the files will not show. if so do you know away around this problem, for I am building a site already on vse with sql 2012!
  #8 (permalink)  
Old November 23rd, 2012, 04:07 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Check under Tools | Options | Database Tools | Data Connections. What's the default Server Instance Name? If it's (LocalDB)\v11, try changing that .\SqlExpress (where SqlExpress should point to your SQL Server Express instance; preferably 2008 R2, but 2012 might work.

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:
krcfl1 (November 23rd, 2012)
  #9 (permalink)  
Old November 23rd, 2012, 04:25 PM
Authorized User
Points: 115, Level: 2
Points: 115, Level: 2 Points: 115, Level: 2 Points: 115, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default sql

Imar

Thank you but it will not work. Do you have the db for the 2012vs that you can send me, only db. I hate SQL.

When I have the monies I will be getting the 2012!

My address is shoghes@tampabay.rr.com
  #10 (permalink)  
Old November 23rd, 2012, 04:36 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am sorry, but you should really provide more information. What does "it will not work" mean? Didn;t you try it out and you just think it will not work? Or did you try it? And if you tried it, what's the erro? What was in tat box in the Options dialog I pointed you to? What's the instance name of your SQL Server? Did you install SQL Server 2008 (R2) as instructed in the book?

SQL Databases should be forwards compatible. I just create a new web site in VS 2012 and dropped in the Planet Wrox 4 database. I can then double-click it and it opens fine.

So, the older database can successfully be opened in SQL Server 2012. This means something is off on your system. I can't tell what without the necessary and relevant info.

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!




Similar Threads
Thread Thread Starter Forum Replies Last Post
want to convert date from 01/12/07 to 12-Jan-2007 hurperl Perl 1 April 12th, 2007 05:47 AM
Problems in Chapt 9 pjwarez BOOK: Beginning Mac OS X Programming 0 August 30th, 2006 02:46 PM





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