Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 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 March 5th, 2009, 08:16 PM
Registered User
 
Join Date: Oct 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to run Chapter 2 Example

I am reading this book via the Wrox 24/7 Books Online. I am using Visual Studio 2008 Professional and SQL Server 2008.

Following the examples in chapter 2 - Adding a Record section, when I run the application as instructed I get an error.

"Error 1 The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Users\x2ws\Documents\Visual Studio 2008\Projects\PaidTimeOffSolution\PaidTimeOffUI\De fault.aspx.cs 18 9 http://localhost/PaidTimeOffUI/"

"Error 2 The type 'System.Data.Linq.Table`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Users\x2ws\Documents\Visual Studio 2008\Projects\PaidTimeOffSolution\PaidTimeOffUI\De fault.aspx.cs 34 9 http://localhost/PaidTimeOffUI/"

"Error 3 'System.Data.Linq.Table`1<V2.PaidTimeOffDAL.ENTUse rAccount>' does not contain a definition for 'InsertOnSubmit' and no extension method 'InsertOnSubmit' accepting a first argument of type 'System.Data.Linq.Table`1<V2.PaidTimeOffDAL.ENTUse rAccount>' could be found (are you missing a using directive or an assembly reference?) C:\Users\x2ws\Documents\Visual Studio 2008\Projects\PaidTimeOffSolution\PaidTimeOffUI\De fault.aspx.cs 34 28 http://localhost/PaidTimeOffUI/"

"Error 4 'System.Data.Linq.Table`1<V2.PaidTimeOffDAL.ENTUse rAccount>' does not contain a definition for 'SubmitChanges' and no extension method 'SubmitChanges' accepting a first argument of type 'System.Data.Linq.Table`1<V2.PaidTimeOffDAL.ENTUse rAccount>' could be found (are you missing a using directive or an assembly reference?) C:\Users\x2ws\Documents\Visual Studio 2008\Projects\PaidTimeOffSolution\PaidTimeOffUI\De fault.aspx.cs 36 28 http://localhost/PaidTimeOffUI/"

I am using the following in my default.aspx.cs file:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using V2.PaidTimeOffDAL;
Any help is greatly appreciated.
 
Old March 5th, 2009, 08:38 PM
Registered User
 
Join Date: Oct 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Figured it out, had to add System.Data.Linq as a reference to the Web Site project, not just the solution.
 
Old March 10th, 2009, 05:27 AM
Authorized User
 
Join Date: Feb 2007
Posts: 39
Thanks: 2
Thanked 2 Times in 2 Posts
Default

System.Data.Linq is not already present in the "using" statements?

Luigi
 
Old March 10th, 2009, 10:55 AM
Authorized User
 
Join Date: Dec 2008
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Default

"Using" (think of it as "include" in c/c++) only used during compilation to resolve compile linkages.

You still need to add the system.data.ling to the web reference to tell the application where to find the system.data.ling.dll.

This happens because chapter 2 sample didn't provide the reference, later samples such as chapter 11 did do that.
 
Old May 14th, 2009, 10:40 AM
Registered User
 
Join Date: May 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I also had this issue, it was kind of an unclear statement in the book.
 
Old August 2nd, 2009, 04:26 AM
Registered User
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default reading from sql

hi dear friends,
i membered newly.

i want that read from sqlserver in C#.net.
but function of read() cannot read.
how do i this??
please help me
 
Old August 2nd, 2009, 11:37 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

Try the tutorials on www.asp.net and the MSDN library. There are even walkthroughs that give you the exact code to use. Or you can google it. There are lots of resources.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to run my project ajeetmittal General .NET 0 June 11th, 2007 05:41 AM
unable to run prog bharathy JSP Basics 0 March 17th, 2006 01:26 PM
Unable to run my application remotely? gowthamsen ASP.NET 1.0 and 1.1 Professional 1 February 20th, 2006 10:57 AM
Error while trying to run the project: Unable to d rktalla .NET Web Services 1 September 28th, 2004 02:48 AM
Unable to Run TOMCAT !!! PLS HELP anilsantas Apache Tomcat 1 April 15th, 2004 01:30 AM





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