Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
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
 
Old December 22nd, 2011, 12:35 AM
Authorized User
 
Join Date: Dec 2011
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Default I get an error when I try to attach the sample database.

This the error I get:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'TEST-SERVER'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdN...r&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Directory lookup for the file "E:\Data\SqlServer\2008Express\MSSQL10.SQL2008EXPR ESS\MSSQL\DATA\PlanetWrox_log.ldf" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft SQL Server, Error: 5133)

For help, click: http://go.microsoft.com/fwlink?ProdN...3&LinkId=20476




I tried attaching both MDF files to my local connection in SQL Server 2008.


P.S.- Is LINQ really the way to go? Should I focus on learning and using that for my database communication or is it just as good to use SQLSourceAdpaters and plain old SQL?





EDIT - Nevermind, I just had to delete the log file to get it to load. My second questions still stands though, and I am really getting into this book. It's so useful!

Last edited by IceThatJaw; December 22nd, 2011 at 12:40 AM..
 
Old December 23rd, 2011, 04: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

Quote:
P.S.- Is LINQ really the way to go? Should I focus on learning and using that for my database communication or is it just as good to use SQLSourceAdpaters and plain old SQL?
IMO, it is. Especially with the new Code First option, EF gives you a clean yet accessible approach to data access. However, it may not fit in every application. If you need more control over generated SQL for example, you may still want to use direct ADO.NET such as SqlConnection and SqlDataReader objects. I use EF for the majority of the projects I am involved in.

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
how to attach database file pramuk97 BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 0 February 28th, 2011 02:21 AM
Unable to attach database with sql server management robbaralla BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 April 23rd, 2010 12:54 PM
How to attach database left in Standby mode getnojunk SQL Server 2000 0 February 25th, 2006 09:43 AM
Attach The database on oracle server Israr SQL Server 2000 0 September 8th, 2005 03:30 AM
Attach Database ! pamyral_279 VS.NET 2002/2003 2 May 17th, 2005 07:08 AM





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