Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : 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 December 8th, 2013, 06:07 PM
Authorized User
 
Join Date: Sep 2013
Posts: 18
Thanks: 8
Thanked 1 Time in 1 Post
Default problem with database first

Hi, first of all, thanks again for your book...
I have read your appendix 2 of your book since I have SQL Server 2012 Enterprise Edition... and still have not figure out how to attach it without problem into visual studio...
when I have SQL Server Express, I have a very good life!!!... when I bought SQL Server 2012 Enterprise Edition, everything wants to fight with me!...
I create a database in SSMS, and then I want to create an entity model in visual studio... it first says "this file is in use. enter a new name or close the file that's open in another program"... then I take offline the database in SSMS... and new error is " can't open database ((path database)) requseted by the login. The login faild.
login faild for user "((Pc Name and User))" "....
I have asked this question is forum general asp.net... but I've done it with your book too... and again I gain nothing :(...
I also use Visual Studio 2013 Ultimate....
if this question is not related to your book, please tell me where should I ask it...
I really need it...
thanks in advance....
 
Old December 9th, 2013, 05:08 AM
Authorized User
 
Join Date: Sep 2013
Posts: 18
Thanks: 8
Thanked 1 Time in 1 Post
Default

I think , I should use "Microsoft SQL Server" datasource in wizard, not "Microsoft SQL Server Database File (SqlClient)"... the second one is the direct calling of a database file, which is not the right way for commercial version of SQL Server 2012 ( as I told! ... not sure!)... the second one seems to be work just with SQL Server Express Edition...
I hoped this helps another people in future:)
thanks...
 
Old December 9th, 2013, 08:33 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,

Yes, that's correct. When you attach a database to SQL Server, you can no longer connect to the .mdf file directly, Instead, you need to use a connection string that points to a SQL Server instance.

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
Database problem Fed BOOK: ASP.NET 3.5 Website Programming Problem Design Solution 5 August 28th, 2011 09:08 AM
Problem to restore database in C#2005 database acmuralee MySQL 0 March 25th, 2008 04:42 AM
database problem rahul8346 SQL Server 2000 1 May 16th, 2006 11:13 AM
database problem? hosefo81 PHP Databases 4 January 9th, 2004 09:00 AM
problem for the database rachelwang All Other Wrox Books 2 August 4th, 2003 02:55 AM





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