Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 5th, 2009, 08:16 PM
Registered User
 
Join Date: Oct 2007
Location: Sacramento, CA
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.
  #2 (permalink)  
Old March 5th, 2009, 08:38 PM
Registered User
 
Join Date: Oct 2007
Location: Sacramento, CA
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.
  #3 (permalink)  
Old March 10th, 2009, 05:27 AM
Authorized User
Points: 180, Level: 3
Points: 180, Level: 3 Points: 180, Level: 3 Points: 180, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2007
Location: Milan, , Italy.
Posts: 39
Thanks: 2
Thanked 2 Times in 2 Posts
Default

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

Luigi
  #4 (permalink)  
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.
  #5 (permalink)  
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.
  #6 (permalink)  
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
  #7 (permalink)  
Old August 2nd, 2009, 11:37 PM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.